Hi, My web app is based on Tomcat 9.0.45 server. I have migrated from Tomcat 7 to Tomcat 9 and from log4j 1.x to log4j 2.x. I have updated the log4j2.properties as per log4j 2.x standard, still my tomcat.log file is not getting generated and all the application log are coming on console instead of redirecting this to tomcat.log file.
so 1.tomcat.log is not geting generated 2. all the contents are logging and showing on the application console instead of getting this logged inside the tomcat.log file. Tomcat 9.0.45 + log4j 2.14.1 is used. I am also attaching my log4j property file. Please find this attached here. Kindly suggest me the solution. Thank you. Ravi
#log4j.rootLogger=error, R #log4j.appender.R=org.apache.log4j.RollingFileAppender #log4j.appender.R.File=${catalina.base}/logs/tomcat.log #log4j.appender.R.MaxFileSize=10MB #log4j.appender.R.MaxBackupIndex=10 #log4j.appender.R.layout=org.apache.log4j.PatternLayout #log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n #log4j.logger.org.apache.catalina=error, R #log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=error, R #log4j.logger.org.apache.catalina.core=error, R #log4j.logger.org.apache.catalina.session=error, R status = error name = Log4j2PropertiesConfig appender.rolling.type = RollingFile appender.rolling.name = RollingFile appender.rolling.fileName =D:/TH512-15/administrator/domain/RD1/tomcat/logs/tomcat.log appender.rolling.layout.type = PatternLayout appender.rolling.layout.pattern =%p %t %c - %m%n appender.rolling.policies.type = Policies appender.rolling.policies.size.type = SizeBasedTriggeringPolicy appender.rolling.policies.size.size=10MB appender.rolling.strategy.type = DefaultRolloverStrategy appender.rolling.strategy.max = 10 logger.rolling.name = org.apache.catalina logger.rolling.level = error logger.rolling.additivity = false logger.rolling.appenderRef.rolling.ref = RollingFile logger.rolling.name = org.apache.catalina.core.ContainerBase.[Catalina].[localhost] logger.rolling.level = error logger.rolling.additivity = false logger.rolling.appenderRef.rolling.ref = RollingFile logger.rolling.name = org.apache.catalina.core logger.rolling.level = error logger.rolling.additivity = false logger.rolling.appenderRef.rolling.ref = RollingFile logger.rolling.name = org.apache.catalina.session logger.rolling.level = error logger.rolling.additivity = false logger.rolling.appenderRef.rolling.ref = RollingFile
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org