Log4gTTCCLayout

Log4gTTCCLayout — Output the time, thread, category & context

Synopsis

                    Log4gTTCCLayout;
                    Log4gTTCCLayoutClass;

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:

  1. thread-printing

  2. category-prefixing

  3. 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.

Note

The nested diagnostic context may be empty (as in the example).

Note

Do not use the same TTCC layout instance from within different appenders. The TTCC layout is not thread-safe when used in this way.

Note

The Log4gPatternLayoutClass provides a more flexible alternative.

Details

Log4gTTCCLayout

typedef struct {
} Log4gTTCCLayout;

Log4gTTCCLayoutClass

typedef struct {
} Log4gTTCCLayoutClass;

The Log4gTTCCLayoutClass structure does not have any public members.