The main Apache Tomcat configuration file is at /opt/bitnami/tomcat/conf/server. xml. Once Apache Tomcat starts, it will create several log files in the /opt/bitnami/tomcat/logs directory.
By default, the Tomcat HTTP Access Logs are stored in the dotserver/tomcat-X.x/logs/ folder within the dotCMS distribution, and the files are named dotcms_access. YYYY-MM-DD. log, where the YYYY-MM-DD in the file name is replaced by the date of the log file.
The Apache Tomcat logs are an essential feature that allows sysadmins to view what is accessed and how the server handles the various resources. Although you can implement logging for the Java applications written for Tomcat, getting the internal webserver logs can be instrumental in troubleshooting.
I'm using log4j to log in application.
Now the log file is created in the some location, like j:/logs/mylog.log, I want the log file mylog.log to be created in the tomcat/logs foder.
How to set this?
Now current log4j property is as follows
log4j.appender.fileAppender=org.apache.log4j.DailyRollingFileAppender
log4j.appender.fileAppender.datePattern=dd MMM yyyy
log4j.appender.fileAppender.file=/logs/test/parent/LearnFile.log
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With