logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Heribert Hansen <heribert.han...@googlemail.com>
Subject Logging to different files with log4j 2
Date Wed, 19 Mar 2014 06:47:28 GMT
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!

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message