c Conversion Character

Reports the name of the logger that generates the log event.
Alias: logger
Default: Complete logger name; for example, "Logging.Appender.IOMCallContext".

Syntax

c [ {precision-specifier} ]

Optional Argument

precision-specifier
specifies a decimal constant to indicate the number of logger levels to display in the message. If you specify precision-specifier, only the corresponding number of right-most components of the logger name are included in the output.
Requirement If the precision specifier is used, it must be enclosed in a pair of braces.
Interaction If the precision specifier is used, only the corresponding number of right-most components of the logger name are included in the output.

Example

For the logger name "Logging.Appender.IOMCallContext", the pattern %c{2} generates this output:
"Appender.IOMCallContext"