You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "Schuhmacher, Bret" <Br...@Aspect.com> on 2004/07/16 17:51:29 UTC

Anyone using SNMPTrapAppender?

I need a little push in the right direction, please...
 
I have a question about using the DelimitedConversionPattern from inside my program that's doing the logging.  Right now I have something like this:
myLog.debug("my debug message from host " + strHostName);
 
This writes a single string to the SNMP Trap appender like this:
my deug message from host xyzhost
 
Now I need to do variable bindings and I'm not sure how the actual log statement in the java source must change to accommodate the delimited conversion pattern.  Should I delimit the log setting like this?
myLog.debug("my debug message from host ;" + strHostName);
 
this line puts a ";" in the log string so that, hopefully, the delimited conversion pattern will extract that as two strings - one containing "my debug message from host" and another with "xyzhost".  Is this correct?
 
If someone can merely supply me a line of working log code that uses the SNMPDelimitedConversionPattern and possibly the actual pattern from their rc or xml file I'd be really grateful!
 
Thanks in advance!!
 
Rgds,
 
Bret

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org