logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Schuhmacher, Bret" <Bret.Schuhmac...@Aspect.com>
Subject Anyone using SNMPTrapAppender?
Date Fri, 16 Jul 2004 15:51:29 GMT
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!!

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

View raw message