Details
-
New Feature
-
Resolution: Unresolved
-
Minor
-
None
-
1.1.3
Description
In PatternLayout, log4J (both 1.2 and 2.0) supports the %l encoding, which reads:
Used to output location information of the caller which generated the logging event.
The location information depends on the JVM implementation but usually consists of the fully qualified name of the calling method followed by the callers source the file name and line number between parentheses.
The location information can be very useful. However, its generation is extremely slow and should be avoided unless execution speed is not an issue.
However, this is not supported in Logback. I know that similar behavior can be achieved with {{%caller
{1}}}, but the formatting for that is quite rigid and also can be quite ugly. Can we have support for %l?