Log4net
  1. Log4net
  2. LOG4NET-254

[PATCH] Added Snmp V1 Trap Appender

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 1.2 Maintenance Release
    • Component/s: Appenders
    • Labels:
      None
    • Environment:
      independent

      Description

      Added simple Snmp V1 Trap appender.

      Properties are based on configuration XML for log4j. I interpreted ApplicationTrapOID
      from the log4j appender to mean the ObjectOID for the message variable added to the TrapPDU.
      Uptime ticks PDU element based on time appender class is instantiated. Could be extended
      to include options for app pool uptime or time since last boot, etc. 4K character limit
      imposed on message length, extra cares will be truncated.

      Baseline revision: 881070

      New File:
      apache-log4net\src\Appender\SnmpTrapAppender.cs

      Example Config:

      <appender name="SnmpTrapAppender" type="log4net.Appender.SnmpTrapAppender">
      <RemoteAddress value="127.0.0.1" />
      <RemotePort value="162" />
      <EnterpriseOID value="1.3.6.1.X.X.XXX.X.X" />
      <ApplicationTrapOID value="1.3.6.1.X.X.XXX.X.X.X.14" />
      <CommunityString value="public" />
      <GenericTrapType value="EnterpriseSpecific" />
      <SpecificTrapType value="16" />
      <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%message" />
      </layout>
      </appender>

        Activity

        Thomas Johnson created issue -
        Thomas Johnson made changes -
        Field Original Value New Value
        Attachment SnmpTrapAppender.patch [ 12442017 ]
        Thomas Johnson made changes -
        Attachment SnmpTrapAppender.patch [ 12442017 ]
        Hide
        Thomas Johnson added a comment -

        built on log4net.vs2008.csproj revision 881070

        Show
        Thomas Johnson added a comment - built on log4net.vs2008.csproj revision 881070
        Thomas Johnson made changes -
        Attachment SnmpTrapAppender.patch [ 12442018 ]
        Hide
        Thomas Johnson added a comment -

        SnmpTrapAppender.cs

        apache-log4net\src\Appender\SnmpTrapAppender.cs

        Show
        Thomas Johnson added a comment - SnmpTrapAppender.cs apache-log4net\src\Appender\SnmpTrapAppender.cs
        Thomas Johnson made changes -
        Attachment SnmpTrapAppender.cs [ 12442019 ]
        Thomas Johnson made changes -
        Comment [ SnmpTrapAppender.cs

        apache-log4net\src\Appender\SnmpTrapAppender.cs ]
        Stefan Bodewig made changes -
        Affects Version/s v.Next [ 12310261 ]
        Hide
        Stefan Bodewig added a comment -

        we won't be able to use your patch(es) unless you grant a license to the ASF

        Show
        Stefan Bodewig added a comment - we won't be able to use your patch(es) unless you grant a license to the ASF
        Stefan Bodewig made changes -
        Fix Version/s 1.2 Maintenance Release [ 12317606 ]
        Hide
        Thomas Johnson added a comment -

        Thanks, how do I do that? P.S. I've got a ipv6 patch for this should I recreate this patch ?

        Show
        Thomas Johnson added a comment - Thanks, how do I do that? P.S. I've got a ipv6 patch for this should I recreate this patch ?
        Hide
        Stefan Bodewig added a comment -

        Yes, I think you should re-create them.

        When you upload the patch(es), there is a checkbox you need to check in order to grant a license to the ASF.

        Show
        Stefan Bodewig added a comment - Yes, I think you should re-create them. When you upload the patch(es), there is a checkbox you need to check in order to grant a license to the ASF.
        Hide
        Thomas Johnson added a comment -

        Hey, I haven't done this yet because I'm lazy and it took 2 years to get a response on my patch

        Show
        Thomas Johnson added a comment - Hey, I haven't done this yet because I'm lazy and it took 2 years to get a response on my patch
        Hide
        Stefan Bodewig added a comment -

        Hi Thomas, I understand the frustration. Take your time. Thanks.

        Show
        Stefan Bodewig added a comment - Hi Thomas, I understand the frustration. Take your time. Thanks.
        Hide
        Thomas Johnson added a comment -

        Hey, can you send me a link to the "how to contribute" document?? - I can't remember any of this

        Show
        Thomas Johnson added a comment - Hey, can you send me a link to the "how to contribute" document?? - I can't remember any of this
        Hide
        Stefan Bodewig added a comment - - edited

        I'm not aware of any log4net specific document, http://www.apache.org/dev/contributors.html is the foundation wide one. It looks full of technical details that may hide the pretty simple concepts.

        If all you want to do is contribute a new appender then adding the new source file to a JIRA issue like this one and checking the checkbox that says something along the lines of "I grant the ASF license to redistribute this under the Apache Software License" then you are done. Of course it would be great if you could also provide tests and patches to the documentation.

        If you plan to stay around for more than this - you are more then welcome - then please subscribe to the dev list, join discussions and make yourself familiar enough with svn to just jump in.

        Show
        Stefan Bodewig added a comment - - edited I'm not aware of any log4net specific document, http://www.apache.org/dev/contributors.html is the foundation wide one. It looks full of technical details that may hide the pretty simple concepts. If all you want to do is contribute a new appender then adding the new source file to a JIRA issue like this one and checking the checkbox that says something along the lines of "I grant the ASF license to redistribute this under the Apache Software License" then you are done. Of course it would be great if you could also provide tests and patches to the documentation. If you plan to stay around for more than this - you are more then welcome - then please subscribe to the dev list, join discussions and make yourself familiar enough with svn to just jump in.
        Hide
        Dominik Psenner added a comment -

        Is there any update on this?

        Show
        Dominik Psenner added a comment - Is there any update on this?

          People

          • Assignee:
            Unassigned
            Reporter:
            Thomas Johnson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development