Awesome - Thanks guys! Really loving log4j 2. In the process of switching
everything over ATM. Thanks again,
Ole
On 06/27/2016 07:06 PM, Ralph Goers wrote:
I also provided an answer that provides more information on why Gary’s answer
is correct and why it is so different.
Ralph
On Jun 27, 2016, at 4:26 PM, Gary Gregory <[email protected]
<mailto:[email protected]>> wrote:
On Mon, Jun 27, 2016 at 3:56 PM, Ole Ersoy <[email protected]
<mailto:[email protected]>> wrote:
Any chance that the simplicity level for this could could match SLF4J? I
think that there is a setLevel method on Logger, but it's protected or private
...
SLF4J Example:
http://stackoverflow.com/questions/38064066/configuration-a-logger-programmatically-with-log4j-2
1. // org.apache.logging.log4j.core.config.Configurator;
2.
3. Configurator.setLevel("com.example.Foo",Level.DEBUG);
4.
5. // You can also set the root logger:
6. Configurator.setRootLevel(Level.DEBUG);
I also replied on SO.
Gary
Cheers,
Ole
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
<mailto:[email protected]>
For additional commands, e-mail: [email protected]
<mailto:[email protected]>
--
E-Mail: [email protected] <mailto:[email protected]> | [email protected]
<mailto:[email protected]>
Java Persistence with Hibernate, Second Edition <http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com <http://garygregory.wordpress.com/>
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory