logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remko Popma <remko.po...@gmail.com>
Subject Re: FileAppender dynamic fileName
Date Tue, 29 Nov 2016 00:52:19 GMT
Aha!
Looks like <File name="F" fileName="${sys:proc}"> works, but 
<File name="F" fileName="${sys:proc:unknown}"> doesn't. 
For some reason I thought a default value could be specified after a second colon ':'. 
I guess I got confused with something else. 

I can see the FileAppender plugin being initialized with the resolved lookup string. The status
log doesn't show that the lookup was invoked. It may be good to improve this. 

Anyway, this solves my immediate problem. 

Thanks!

Sent from my iPhone

> On 28 Nov 2016, at 22:50, Apache <ralph.goers@dslextreme.com> wrote:
> 
> Using a single $ works as that is resolved during configuration. As I recall, ‘$${nnn:…}’
does not work.  I specify ${sys:catalina.home} in the filename for all of my web apps.
> 
> Ralph
> 
>> On Nov 27, 2016, at 11:10 PM, Remko Popma <remko.popma@gmail.com> wrote:
>> 
>> Does the FileAppender support lookups in the configured file name?
>> 
>> Something like 
>> <File name="F" fileName="${sys:procName:unknown}">
>> ...
>> 
>> Does a JIRA ticket already exist for this? (Couldn't find it...)
>> 
>> I have a number of processes that are configured almost identically; with the log4j2.xml
inside one of the jars. Trying to let the different processes log to separate files. Not as
easy as I thought it would be. :-)
>> 
>> Remko
>> 
>> Sent from my iPhone
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>> 
>> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message