logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Masterson <mark_master...@compuserve.com>
Subject Re: Generating SNMP traps from Java Application
Date Mon, 13 Feb 2006 19:58:45 GMT
Ouch.  Thanks for the vote of confidence, there, Elijah.

FWIW, I've avoided implementing a TrapSender for the Snmp4j libary 
(although I find it otherwise quite cool) because it's limited to JDK 
1.4, and that breaks with the design goals of log4j itself (at least up 
until "the release previously know as Prince, ehhh, v. 1.3").

The "**JoeSNMPTrapSender**" is a sort of a Mediator class, that hooks up 
the (otherwise library neutral) SNMPTrapAppender with the concrete, 
JoeSnmp-specific implementation.

The Appender itself is/does a wee bit more than just that, and for more 
than just the Joe implementation...  Swarna is perhaps not optimally 
advised to reinvent that particular wheel...  But, of course, I'm 
slightly biased.

Cheers,
Mark
The poor slob responsible for: 
(http://www.m2technologies.net/asp/snmpTrapAppender.asp)

Elijah Baley wrote:
>
> There is such a logger called (if I remember correctly) 
> JoeSNMPTrapAppender. However, look into using SNMP4J (www.snmp4j.org - 
> open source) and implement your own appender...
>
> ----- Original Message ----- From: "Swarna Mani" <smani@five9.com>
> To: <log4j-user@logging.apache.org>
> Sent: Monday, February 13, 2006 04:33
> Subject: Generating SNMP traps from Java Application
>
>
>> My Name is Swarna. I am trying to implement generation of SNMP traps 
>> from Java
>> application using log4j. We already have log4j implemented for 
>> generating log
>> messages.
>>
>> When I searched in the web, I came across posts in 
>> http://blog.gmane.org Wherein
>> it is explained that code like
>>
>> logger.warn("Send a trap");
>>
>>
>> will generate a trap.
>>
>> My question is we use similar one to generate logs, how can we 
>> distinguish
>> between entries for logs and entries for traps?
>>
>>
>>
>> Also I find that it is mentioned that all we need to do is change the
>> configuration script. I am thinking of using JOESNMP.
>>
>> Will it be possible for you to provide me the steps  on
>>
>> What needs to be coded in java application to differentiate logs and 
>> traps?
>> Where do I install joesnmp?
>> What changes I need to make to log4j.xml?
>> How can I test the same?
>>
>>
>> Thanks in Advance,
>> Swarna
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

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


Mime
View raw message