Menu

#1370 Updated nsDebug to handle nsDebugOutputAll

backport-needed
open
nobody
None
5
2018-06-25
2018-06-19
No

Updated nsDebug to handle nsDebugOutputAll should enable trace printout of all tokens
This solves https://sourceforge.net/p/net-snmp/bugs/2873/

1 Attachments

Discussion

  • Bart Van Assche

    Bart Van Assche - 2018-06-22

    From NET-SNMP-AGENT-MIB.txt:

    nsDebugOutputAll       OBJECT-TYPE
        SYNTAX      TruthValue
        MAX-ACCESS  read-write
        STATUS      current
        DESCRIPTION
          "Whether the agent is configured to display all debugging output
           rather than filtering on individual debug tokens.  Nothing will
           be generated unless nsDebugEnabled is also true(1)"
    

    Is this patch such that all debug tokens are only enabled if nsDebugEnabled has been set?

     

    Last edit: Bart Van Assche 2018-06-22
  • Anders Wallin

    Anders Wallin - 2018-06-25

    The code implements the simple logic;
    nsDebugEnabled==false & nsDebugOutputAll ==true => NO logging
    nsDebugEnabled==true & nsDebugOutputAll==true => Log ALL debug messages
    nsDebugEnabled==true & nsDebugOutputAll ==false => Logging tokens set messages

    But if you interpretate the DESCRIPTION that it's dependent on the order of setting nsDebugEnabled and nsDebugOutputAll, then it's not. e.g
    This order will then not turn on logging
    1. Unset nsDebugEnabled
    2. Set nsDebugOutputAll
    3. Set nsDebugEnabled

    While this will turn on logging
    1. Set nsDebugEnabled
    2. Set nsDebugOutputAll

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.