Go to All Forums

Log4j 2 not logging to file .. instead logging to catalina.out

I have deployed my code into my local tomcat.. there log4j2 logs are appended to the file I have mentioned in the Rollingfileappender. But when I deploy this code in tomcat in unix server applications logs are added into catalina.out. The file gets created but app logs are not added there.. Can't get the root cause. Please help.

 

 

 

Like (1) Edit Delete Reply
Replies (1)

Re: Log4j 2 not logging to file .. instead logging to catalina.out

Hi

The most common mistakes are

  1. Root logger configured with wrong logger name. Note that the names are case-sensitive
  2. Lack of user permissions

Catalina.out is the default log for System.out and System.err streams. May be as a failover, the logs are printed in catalina.out file.

If you could share your log4j configurations, we can help you find and resolve the issue

 

Like (0) Reply

Was this post helpful?