alicjasalamon
alicjasalamon

Reputation: 4291

log4j: How to log logger name?

I need to put Logger name into every log. Now I use

logger.error(logger.getName());.

Is there any better way? I don't want to use %m here.

Upvotes: 3

Views: 2428

Answers (1)

You can use the %c option in your logging text.

Upvotes: 6

Related Questions