JAVA开发 资料收集之 log4j日志路径的设置

The conclusion comes like that:

The current path (./)is stands for the project location.(see pic 1: Location)

 

How can we set the path of the log file accurately in log4j.properties?

Such as there is a web project which I created in eclipse.

Detail info like following:

pic 1

And we set the log path like following in log4j.properties:

log4j.appender.R.File=./testutilities.log

Then we get the testutilities.log in the following path(path1 in pic2)

If we set the log path like this:

log4j.appender.R.File=./RCA2CRM_/testutilities/testutilities.log then path2(in pic2)

pic 2

 

 

posted @ 2012-11-23 00:51  王超_cc  阅读(659)  评论(0编辑  收藏  举报