I know how to output classname and methodname with log4j, both fields can be aligned and padded separately, e.g. this pattern:
[%d{ISO8601}] %-5p %-10C{1}:%-10M %m%n
produces something like:
[2012-09-20 08:25:12,111] WARN Class :method Logtext1 which should align
[2012-09-20 08:25:12,111] WARN ClassTwo :methodName Logtext2 which should align
This will align the logged text (in most cases), but the classname and methodname are ugly spaced.
So what I would like to output is something like:
[2012-09-20 08:25:12,111] WARN Class:method Logtext1 which should align
[2012-09-20 08:25:12,111] WARN ClassTwo:methodName Logtext2 which should align
Is this possible using only configuration?
Can you suggest another way of outputting methodname and classname, keeping the logged message text aligned?