How can we have different logger ( that has independent configuration) per process when using log4cxx library?
Asked
Active
Viewed 254 times
0
-
My first thought would be launch each process with its own config file. Or you can declare multiple loggers in one config file, and have each process use a different one. Are there a few distinct processes, or one type of process which can get launched multiple times? – Kenny Ostrom Apr 30 '17 at 13:35
-
no, there is multiple forks of same executable – vahed mafi May 01 '17 at 05:04
1 Answers
2
log4cxx
docs, Configuration
section shows how to configure logging by a configuration file passed as a command line arg. So basically you launch your process specifying a configuration file (different for different processes)

Andriy Tylychko
- 15,967
- 6
- 64
- 112
-
Actually, I need different logger per each process fork at run time – vahed mafi May 01 '17 at 05:06