1

I have an existing web application which uses log4j for logging purposes and it will create a log file in my local system. Now, I have to migrate that web application to AWS platform. In order to move it to AWS, what changes need to done in terms of logging? How should be the log4j.properties file? Is there any need to change the application code?

4

1 回答 1

0

您的申请无需更改;log4j 仍然可以工作。

您不想用日志填满文件系统,但也希望保留适当数量的日志记录,以防遇到需要调试的问题。Log4j 将处理它自己的日志轮换。您需要确保您的log4j.properties文件设置为将日志保留一定时间长度。

确保您的日志目录存在于新服务器上和/或使用正确的权限创建它。或更改log4j.properties文件。

log4j.appender.R.File=/some/dir/logs/your_app.log
于 2013-04-04T13:08:38.017 回答