logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <rgo...@apache.org>
Subject Re: Logging to different files with log4j 2
Date Wed, 19 Mar 2014 14:16:56 GMT
Yes, this is possible with the RoutingAppender.

Ralph

> On Mar 18, 2014, at 11:47 PM, Heribert Hansen <heribert.hansen@googlemail.com>
wrote:
> 
> I have an application that should write logging information into different
> files. The application executes several tasks (partially in parallel).
> Every task should use a separate file for logging. The filename should be
> "{loggingBasePath}/{taskId}.log". The loggingBasePath will be configurable
> by a command line argument. The taskId is the id of the task the
> application executes and will be assigned at runtime to the task after
> instantiation of the task. As you can see, the filename of the log is very
> dynamic and is not defined at startup.
> 
> The other parts of the application should write log entries to another log
> file called application.log.
> 
> Is that possible with log4j 2?
> 
> Thank you very much!

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