Log4g Reference Manual | ||||
---|---|---|---|---|
Top | Description |
The TTCC layout outputs the time, thread, category (logger name), and context (nested diagnostic context) of a log event, hence the name.
Some fields can be individually enabled or disabled via the corresponding properties:
thread-printing
category-prefixing
context-printing
Here is an example of the TTCC output:
176 [main] INFO org.gnome.log4g.foo - an example message 225 [main] DEBUG org.gnome.log4g.bar - another example message
The first field is the number of milliseconds elapsed since the Log4g system was initialized. The second field is the name of the thread that logged the event. The third field is the log level. The fourth field is the logger category to which the statement belongs.
The fifth field (just before the '-') is the nested diagnostic context.
The nested diagnostic context may be empty (as in the example).
Do not use the same TTCC layout instance from within different appenders. The TTCC layout is not thread-safe when used in this way.
The Log4gPatternLayoutClass provides a more flexible alternative.