1/18/2009

Software Tracing VS. Event Logging

In software engineering, Tracing is a specialized use of Logging to record information about a program's execution. This information is typically used by programmers for debugging purpose.
- from Wikipedia

In other words, Logging is the generic term for recording information, while Tracing is the specific form of logging used to debug. Some people differentiate between "logging" that's useful for post-release diagnostics and "tracing" for development purposes.

- Event Logging provides system administrators with information useful for diagnostics, operation and auditing. The different classes of events that will be logged, as well as what details will appear in the event messages, are often considered early in the development cycle.

- Software Tracing provides developers with information useful for debugging. This information is used both during the development cycle and after the software is released.

But in practical, the distinction between these two terms is not so obvious and sometimes, they are used alternatively.

For example, .Net provides logging mechanism by means of Debug/Trace object in System.Diagnostics namespace. Here Trace is used for operational/diagnose purpose in release/production code, while Debug output information only in debug/development code.
MSDN has a detailed description on this topic.

Popular systems:
1. Apache Logging can be used for both purposes
2. SysLog can be used for event logging purpose
3. Win32 Event Logging is for operation purpose and Win32 Event Tracing is for developer

Reference:
[1]http://en.wikipedia.org/wiki/Tracing_(software)
[2]http://en.wikipedia.org/wiki/Syslog
[3]http://craigrandall.net/archives/2004/06/logging-vs-tracing/
[4]http://ltt.polymtl.ca/tracingwiki/index.php/TracingBook
[5]http://mkdot.net/blogs/dejan/archive/2008/10/23/wcf-tracing-and-message-logging.aspx

No comments: