Programmatically Modifying the Current Configuration after Initialization

2018-02-08 Thread Mike Kienenberger
As others have reported in years past, the examples in the docs for Programmatically Modifying the Current Configuration after Initialization are out of date. They don't compile. They don't work (affect the existing logging) even if you do fix the errors. Here's my situation: I am working in

Re: Programmatically Modifying the Current Configuration after Initialization

2018-02-08 Thread Ralph Goers
If you want to replace the existing configuration you should be able to do: Configurator.initialize(“MyApp”, “app-log4j2.xml”); This will look for a file named app-log4j2.xml on the class path. Ralph > On Feb 8, 2018, at 1:28 PM, Mike Kienenberger wrote: > > As others have reported in years p

Reducing Redundancy in Properties File

2018-02-08 Thread Kavitha Balan Nair
Hi All, Can we have a default appender with those properties that are same for all the appenders which we are using. For example: appender.service1.type=RollingFile appender.service1.name=RollingFile_SERVICE1 appender.service1.fileName=${sys:logware.lucas.root}/log/service1_${date:MMdd}

Programmatic disabling/enabling loggers

2018-02-08 Thread Chandra
Guys, I have a requirement for the loggers to be disabled and enabled during my runtime. I’m assuming this can be done by Filters somehow, will need to check the doc. Anyone has a better alternatives? Thanks, Best, Chandra