[SNMP4J] Setting the log level

Miroslav inliner683 at gmx.de
Fri Jan 11 17:26:42 CET 2008


Hello,

i am using the JDK logging mechanism as I wrote in my question:

LogFactory.setLogFactory(new JavaLogFactory());

This has nothing to do with log4j. log4j is actually not
even on my classpath.

Snmp4j allows setting the log level independantly of the underlying
logging implementation. My question was about the usage of Snmp4j's 
log mechanism.


-------- Original-Nachricht --------
> Datum: Thu, 10 Jan 2008 10:39:52 -0800
> Von: "Eugene R. Snider" <gene at cvtt.net>
> An: inliner683 at gmx.de
> CC: snmp4j at agentpp.org
> Betreff: Re: [SNMP4J] Setting the log level

> The technology underlying the logger is the apache log4j package 
> (bundled with snmp4j). Additional documentation about properties and the 
> API are available
> >from the apache web site ( http://logging.apache.org/log4j/1.2/index.html
> )
> 
> Gene
> 
> inliner683 at gmx.de wrote:
> > Hello,
> >  
> > what is the suggested way to set the log level for an agent implemented
> with snmp4j?
> >
> > I know the method 
> >
> > LogFactory.getLogger(Foo.class).setLogLevel(LogLevel.ALL)
> >
> > but this seems to affect only one class. I tried it on BaseAgent.class
> > but this seems to have no impact.
> >
> > I am using 
> >
> > LogFactory.setLogFactory(new JavaLogFactory());
> >
> > in my agent. 
> >
> > I also discovered that logging can be influenced with the system
> property
> >
> > snmp4j.LogFactory
> >
> > Is there any documentation how the logging (and perhaps the log level
> too) can
> > be influenced with system properties/command line parameters?
> >
> > Thank you.
> >   

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger?did=10



More information about the SNMP4J mailing list