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]> 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 > > <http://stackoverflow.com/questions/38064066/configuration-a-logger-programmatically-with-log4j-2> > > // org.apache.logging.log4j.core.config.Configurator; > > Configurator.setLevel("com.example.Foo", Level.DEBUG); > > // You can also set the root logger: > 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/ <http://garygregory.com/> > Tweet! http://twitter.com/GaryGregory <http://twitter.com/GaryGregory>
