java - Create log4j logfiles per process -


i'm using log4j2, , have configuration in log4j2.xml (in classpath s automatically configured)

in particular case, want create separate log files per process.

i have framework multiple packages , multiple classes. have statements like:

logger logger = logmanager.getlogger(getclass()); 

lets have 3 processes a, b , c. how should configure log4j 3 output files a.log, b.log , c.log , include logging calls made in framework classes?

i want able log individual packages/classes other log appenders if need debug etc, prefer keep getclass() argument mentioned above.

all ideas welcome!

give every process own configuration file. specify different paths in these configurations.

you can specify full path of configuration file system property: -dlog4j.configurationfile=path/to/log4j2.xml


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -