Logging LogBook information in a file
alimohsin25 opened this issue · 6 comments
Hi,
I am using Log4j to log information in a log file. Below is the configuration I have added in log4j.properties file:-
log4j.rootLogger=TRACE, file,logbook
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=logs/application.log
log4j.appender.file.MaxFileSize=5MB
log4j.appender.file.MaxBackupIndex=10
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
log4j.logger.org.zalando.logbook=TRACE, FILE
log4j.additivity.org.zalando.logbook=false
log4j.appender.logbook=org.apache.log4j.RollingFileAppender
log4j.appender.logbook.File=logs/logbook-application.log
log4j.appender.logbook.MaxFileSize=5MB
log4j.appender.logbook.MaxBackupIndex=10
log4j.appender.logbook.layout=org.apache.log4j.PatternLayout
I am using spring 2.6.7. I am able to log information on console but not in file. Do I need any configuration to log information in a file?
Thanks,
Regards,
Mohsin
Technically speaking, this is not in scope of Logbook. If console logging works the issue is somewhere in the configuration of your logging library of choice.
Okay, thanks.
Thanks
Can anyone help in this regard? I agree this is not in the scope of Logbook but just any guidance on what should I look into. I have tried many different options but could not resolve this.
closed
closed