Skip to content
Snippets Groups Projects
Commit ffc30a0d authored by Ruud Overeem's avatar Ruud Overeem
Browse files

BugID: 717

Added INIT_VAR_LOGGER(logpropfile, logfile) macro to be able the pass the
name of the logfile you want to use.
Use %filename in the log_prop file on the place you want the name substituted.
E.g. log4cplus.appender.FILE.File=../log/%filename
or   log4cplus.appender.FILE.File=../log/%filename_and_a_lot_more

THIS MACRO NEEDS log4cplus WITH PATCH 2!
(/usr/local/log4cplus102P2/...)
parent 24a0c71c
No related branches found
No related tags found
No related merge requests found
...@@ -62,6 +62,17 @@ namespace LOFAR { ...@@ -62,6 +62,17 @@ namespace LOFAR {
} \ } \
} while(0) } while(0)
#define INIT_VAR_LOGGER(filename,logfile) do { \
::LOFAR::lofarLoggerInitNode(); \
LofarInitTracingModule \
if (!strstr(filename, ".log_prop")) { \
log4cplus::PropertyConfigurator::doConfigureP2(log4cplus::tstring(filename)+".log_prop",logfile); \
} \
else {\
log4cplus::PropertyConfigurator::doConfigureP2(filename,logfile); \
} \
} while(0)
// After initialisation a thread is started to monitor any changes in the // After initialisation a thread is started to monitor any changes in the
// properties file. An intervaltime in millisecs must be provided. // properties file. An intervaltime in millisecs must be provided.
#ifdef USE_THREADS #ifdef USE_THREADS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment