You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Johannes Siebel (JIRA)" <ji...@apache.org> on 2015/02/25 14:27:04 UTC
[jira] [Created] (LOG4J2-962) Main Arguments Lookup not working
Johannes Siebel created LOG4J2-962:
--------------------------------------
Summary: Main Arguments Lookup not working
Key: LOG4J2-962
URL: https://issues.apache.org/jira/browse/LOG4J2-962
Project: Log4j 2
Issue Type: Bug
Components: Lookups
Affects Versions: 2.1
Environment: Windows 7 x64, Java Batch Application
Reporter: Johannes Siebel
It is not possible to use the Main Arguments Lookup in the current version. The "main" prefix is not present in the corresponding Interpolator object and thus the resolution of the variable (e.g. {main:0}) is not working as advertised in the documentation. As far as I can tell, the problem seems to stem from the PluginManger.collectPlugins-Method that does not acknowledge the existence of the Main Arguments Lookup.
Following the documentation on the website with the following sample log4j2.xml:
<File name="GLOBAL" fileName="${env:DATA_DIR}/log/${env:APP_NAME}.log" >
<PatternLayout pattern="%m%n" header="File: $${main:0}" />
...
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org