You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by ji...@codehaus.org on 2003/04/05 05:39:09 UTC
[jira] Closed: (PNIX-3) Log4j log file defined in enviornment.xml is created in working directory
Message:
The following issue has been closed.
Resolver: Peter Donald
Date: Fri, 4 Apr 2003 9:38 PM
The latest CVS version of phoenix has support for proerty expansion in log4j
xml configuration files. A while back there was some complaints that the logs
were always created relative to the working directory rather than the
application base directory.
This is still the case (as it is with excalibur-logger) but now you can use
propertys ${app.dir} and ${app.name} in your log4j config files and they
should resolve to correct values. A sample configuration for log4j that uses
this method;
<logs version="log4j">
<appender name="DEFAULT" class="org.apache.log4j.FileAppender">
<param name="File" value="${app.home}/logs/default.log"/>
<param name="Append" value="false"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%p [%c] - %m%n"/>
</layout>
</appender>
<appender name="MYBLOCK_FILE" class="org.apache.log4j.FileAppender">
<param name="File" value="${app.home}/logs/myBlock.log"/>
<param name="Append" value="false"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%p [%c] - %m%n"/>
</layout>
</appender>
<root>
<priority value="debug"/>
<appender-ref ref="DEFAULT"/>
</root>
<logger name="root.myBlock">
<priority value="debug"/>
<appender-ref ref="MYBLOCK_FILE"/>
</logger>
</logs>
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/secure/ViewIssue.jspa?key=PNIX-3
Here is an overview of the issue:
---------------------------------------------------------------------
Key: PNIX-3
Summary: Log4j log file defined in enviornment.xml is created in working directory
Type: Bug
Status: Closed
Priority: Minor
Resolution: FIXED
Time Spent: Unknown
Estimate: 0 minutes
Project: phoenix
Components:
Log Manager
Fix Fors:
4.1
Versions:
4.1
Assignee: Peter Donald
Reporter:
Created: Mon, 17 Mar 2003 6:33 PM
Updated: Fri, 4 Apr 2003 9:38 PM
Environment: Phoneix 4.1, linux X86, JDK 1.4.1, Ant 1.5.1
Description:
When configuring log4j loging for a phoenix application, defining the location of the log file "foo.txt" below, results in this log file being created in working directory from which phonix was launched from rather than inside the deployed directory hierarchy of the SAR application it self.
This log file if defined by the SAR application, should reside inside the SAR/foo.txt instead of say PHOENIX_HOME/bin/foo.txt if that happens to be where run.sh is launched from.
please consult mail thread:http://www.mail-archive.com/users%40avalon.apache.org/msg00407.html
example of enviornment.xml configuration used for this.
<logs version="log4j">
<appender name="FILE" class="org.apache.log4j.FileAppender">
<param name="File" value="foo.txt"/>
<param name="Append" value="false"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%p - korosh - %m%n"/>
</layout>
</appender>
<root>
<priority value="debug"/>
<appender-ref ref="FILE"/>
</root>
</logs>
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org