cancel
Showing results for 
Search instead for 
Did you mean: 

[Looking] advice on system generation log

midoscofield
Champ in-the-making
Champ in-the-making
Hi all,

I wanted to have advice on the system log file generation in general, such as limiting the size of the log file,manage which message to display etc…

Thanks
1 REPLY 1

abarisone
Star Contributor
Star Contributor
Hi,
since Alfresco uses log4j for logging, you have some choices.
This solution gives you the opportunity to limit the file size and to decide the number of backup files.

log4j.appender.R.MaxFileSize=100KB
# Keep one backup file

log4j.appender.R.MaxBackupIndex=1

Personally I prefer the DailyRollingFileAppender that rolls each day on a new file

# LOG4J daily rolling log files configuration

log4j.rootLogger=DEBUG, RollingAppender

log4j.appender.RollingAppender=org.apache.log4j.DailyRollingFileAppender

log4j.appender.RollingAppender.File=app.log

log4j.appender.RollingAppender.DatePattern='.'yyyy-MM-dd

log4j.appender.RollingAppender.layout=org.apache.log4j.PatternLayout

log4j.appender.RollingAppender.layout.ConversionPattern=[%p] %d %c %M - %m%n

You can chack log4j page for more info at http://logging.apache.org/

If you need to modify Tomcat's log you need to refer to Tomcat Juli, which performs all logging operations.

Regards,
Andrea