Hi all,
I am trying to cleanup various errors I get during startup. One of the ones
(with 2.3) that really gets me is that I can't log
to a file. For this log file setting:
#out to file
log4j.appender.application = org.apache.log4j.FileAppender
log4j.appender.application.file = ${applicationRoot}/logs/turbine.log
log4j.appender.application.layout = org.apache.log4j.PatternLayout
log4j.appender.application.layout.conversionPattern = %d [%t] %-5p %c - %m%n
log4j.appender.application.append = false
I always get this error:
Apache Tomcat/4.1.24
ConfigServlet::initLogging - log4j configuration str =
[c:\fortius\target\fortius\/WEB-INF/conf/log4j.properties]
log4j:ERROR setFile(null,false) call failed.
java.io.FileNotFoundException: \logs\turbine.log (The system cannot find the
path specified)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:176)
at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:272)
at
org.apache.log4j.FileAppender.activateOptions(FileAppender.java:151)
at
org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:247)
at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:123
)
at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:87)
at
org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.jav
a:645)
at
org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.jav
a:603)
How can I reference the web root? I thought (according to log4j.props from
turbine) taht ${applicationRoot} would do it...
Eric Pugh