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 <[email protected]> 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 <[email protected]> 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: [email protected]
>> For additional commands, e-mail: [email protected]
>> 
>> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to