logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "adam Retter (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (LOG4J2-1050) Add a Log4jLookup class to help write log files relative to log4j2.xml
Date Sun, 27 Sep 2015 16:36:04 GMT

    [ https://issues.apache.org/jira/browse/LOG4J2-1050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14909793#comment-14909793
] 

adam Retter edited comment on LOG4J2-1050 at 9/27/15 4:35 PM:
--------------------------------------------------------------

I just tested this on log4j 2.4 and it seems that the property `log4j:configParentLocation`
is not being substituted from the config file. For example:

{code:title=log4j2.xml|borderStyle=solid}
<RollingRandomAccessFile name="exist.core" filePattern="${log4j:configParentLocation}/webapp/WEB-INF/logs/exist.${rollover.file.pattern}.log.gz"
fileName="${log4j:configParentLocation}/webapp/WEB-INF/logs/exist.log">
```
{code}

Results in a folder literally named "${log4j:configParentLocation}" and the log files being
written to that. Any idea why this isn't working in 2.4? It seems the documentation was updated.
Perhaps the code didn't make it into the release?


was (Author: adamretter):
I just tested this on log4j 2.4 and it seems that the property `log4j:configParentLocation`
is not being substituted from the config file. For example:

```
<RollingRandomAccessFile name="exist.core" filePattern="${log4j:configParentLocation}/webapp/WEB-INF/logs/exist.${rollover.file.pattern}.log.gz"
fileName="${log4j:configParentLocation}/webapp/WEB-INF/logs/exist.log">
```

Results in a folder literally named "${log4j:configParentLocation}" and the log files being
written to that. Any idea why this isn't working in 2.4? It seems the documentation was updated.
Perhaps the code didn't make it into the release?

> Add a Log4jLookup class to help write log files relative to log4j2.xml
> ----------------------------------------------------------------------
>
>                 Key: LOG4J2-1050
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1050
>             Project: Log4j 2
>          Issue Type: New Feature
>          Components: Configurators
>    Affects Versions: 2.3
>         Environment: All
>            Reporter: adam Retter
>            Priority: Minor
>             Fix For: 2.4
>
>         Attachments: 0001-feature-Added-support-for-properties-interpolation-o.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> I attach a patch related to this mailing list post - http://mail-archives.apache.org/mod_mbox/logging-log4j-user/201506.mbox/%3CCAPK0icj%3DY3T9ptBGyGdgbHyMow_YWcfwC6UdLHS-QbgnBk8wkA%40mail.gmail.com%3E
> The patch makes the properties `log4j:configLocation` and `log4j:configParentLocation`
available for substitution in the log4j configuration file.



--
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


Mime
View raw message