开发者

log4j for logging a Web Application which is in production

I am using log4j for logging Our Application which will be into production in three weeks.

Our Application will be deployed into remote location server

We want to take help of lo4j if an user reports error while using the Application .

Regarding this I have some questions

  1. What should be the path of the Log file generated ?? For example (log4j.appender.file.File=开发者_开发技巧C:/app.log)

  2. Should we use RollingFileAppender or DailyRollingFileAppender


If your remote server is on windows then path for log file will suits in the C directory.

else you can set any directory path and assign it to lo4j file like this

#log4j.appender.InputFieldFileAppender.File=${logs.root.directory}\\loging.log

DailyRollingFileAppender has been observed to exhibit synchronization issues and data loss. You can use InputFieldFileAppender if there is no special case.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜