[SNMP4J] Need Help on LogAdapter - snmp4j

Frank Fock fock at agentpp.com
Wed Oct 1 01:52:06 CEST 2008


Hi,

Have you set the LogFactory to Log4jLogFactory in your main
class/method with LogFactory.setLogFactory?

Best regards,
Frank

srenivasan rs wrote:
> Hi All,
> 
> I would like to have a quick clarification on how to initialize the 
> logger mentioned in
> org.snmp4j.util.TableUtils.java. I have the copied log4j setting used by 
> my library.
> But, none of the messages from tableUtils are not logged in the log file.
> 
> private static final LogAdapter logger =
>     LogFactory.getLogger(TableUtils.class);
> 
> Please let me know if you know any other changes to the log4j.properties
> 
> Thanks,
> 
> R Srinivasan
> 
> //log4j.properties
> 
> log4j.rootLogger=DEBUG, testAppender
> log4j.appender.testAppender=org.apache.log4j.FileAppender
> log4j.appender.testAppender.file=log/tst1.log
> #log4j.appender.testAppender.datePattern='.'yyyy-MM-dd_HH_mm
> log4j.appender.testAppender.Append=false
> log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout
> log4j.appender.testAppender.layout.ConversionPattern=%m%n
> 
> #Prevent internal log4j DEBUG messages from polluting the output.
> log4j.logger.org.apache.log4j.PropertyConfigurator=INFO
> log4j.logger.org.apache.log4j.config.PropertySetter=INFO
> log4j.logger.org.apache.log4j.FileAppender=INFO
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com




More information about the SNMP4J mailing list