Problems with org.apache.log4j.PatternLayout format specifiers?

P

Pep

Or my understanding of the specifications?

I have this specification in my configuration file

log4j.appender.A1.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss z}: %-5p
[%t] %8x - %m%n

But the messages in the log file do not contain the name of the tread as I
believe that %t is supposed to do. Instead they contain the name of the
class contained in the thread.

I have checked this by including the name of the thread, using getName(), in
the message and sure enough the %t formatter is only printing the name of
the class not the name of the thread :(

Is %t supposed to show the name of the class, in which case it is my
misunderstanding of the documentation or should it show the name of the
thread in which case there is a problem?

TIA,
Pep.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,830
Latest member
ZADIva7383

Latest Threads

Top