Pros and cons for adding a Trace level

Numerous users have asked for the addition of a trace level. This page debates the pros and cons of such a change.


The TRACE Level has been added in version 1.2.12 of Log4J, so this debate has to be considered outdated.


TRACE is a very natural level to use to output chatty information during development. It "traces" the program while DEBUG rather gives more of some "overview"-type debugging information.

There is a user-based need for it:

Lack of development levels:

With respect to domains:


Trace being "more verbose" than debug

Where does trace fit into the line of verbosity? Here is a clarification:

"Tracing" an application is usually referring to "step-locking" through code, that is, seeing every single change to every single register in the processor, for every operation. For unixers, "strace" and "ltrace" are the tools by which -all- system calls / library calls are "traced". The "trace" word hence, in my opinion, have an established meaning as something -extremely- verbose: it -traces- the applications every single step.

Debug information, on the other hand, is more for being able to debug the application as a whole (and this is, of course, a very overlapping area!). You'd like to see when the application asks the dbpool for an connection (maybe? - the 40 steps required within the dbpool to fetch this connection are at least definitely trace-level outputs), you'd like to see that the user made some "semantic action", e.g. "loaded customer data". This is more "contextual" information, e.g. "the user such and so made the this and that action", and, implicitly, if you'd turn on trace, you'd see -which- small, single-steps that have been done to accomplish this action.

Here's some dictionary lookups: Tiscali's computer dictionary CSGNetwork.Com

Some quotes:

"A method of checking that a computer program is functioning correctly by causing the changing values of all the variables involved to be displayed while the program is running."

"To follow the course or trail of: trace a wounded deer; tracing missing persons."

"To determine the "flow" of a program, often used as a synonym to debug".

"To locate or discover by searching or researching evidence: trace the cause of a disease."

"A mark left by anything passing; a track; a path; a course; a footprint; a vestige; as, the trace of a carriage or sled; the trace of a deer; a sinuous trace."

"A mark, impression, or visible appearance of anything left when the thing itself no longer exists; remains; token; vestige"

"To follow by some mark that has been left by a person or thing which has preceded; to follow by footsteps, tracks, or tokens."

"a clue that something has been present; "there wasn't a trace of evidence for the claim" "

"A line drawn by a recording instrument, such as a cardiograph." "

Possible interpretations

TraceDebate (last edited 2012-01-04 13:58:44 by PaŭloEbermann)