Dangerous SNMP
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Logger Class Reference

The Logger class is the mechanism by which Dangerous SNMP will perform logging operations. More...

#include <logger.hpp>

Public Types

enum  System {
  GENERAL = 0, ENCODING, DECODING, BYTESTREAM,
  PARSING, IO, TRANSPORT, CLIENT,
  AGENTX, MAX
}
 This defines an enumeration for the various "systems" in Dangerous SNMP. More...
 

Public Member Functions

 Logger ()
 Default constructor. More...
 
bool system (System system)
 This returns the logging status for the given system. More...
 
void system (System system, bool enabled)
 This enables or disables logging for the given system. More...
 
std::ostream & out ()
 This returns the output stream for the Logger. More...
 

Protected Attributes

bool systems [Logger::MAX]
 This is the mapping of the logging system to its on/off status.
 

Detailed Description

The Logger class is the mechanism by which Dangerous SNMP will perform logging operations.

Logging is broken down into various sections, so that you may view only what you are interested in looking at.

Member Enumeration Documentation

enum System

This defines an enumeration for the various "systems" in Dangerous SNMP.

Enumerator
DECODING 

Logging related to decoding messages.

BYTESTREAM 

Logging related to ByteStream.

PARSING 

Logging related to parsing.

IO 

Logging related to input/output.

TRANSPORT 

Logging related to transports.

CLIENT 

Logging related to clients.

AGENTX 

Logging related to agents.

MAX 

Placeholder for the maximum value of the enumeration.

Constructor & Destructor Documentation

Logger ( )
inline

Default constructor.

All logging systems are turned off.

Member Function Documentation

std::ostream& out ( )
inline

This returns the output stream for the Logger.

Returns
std::cout.
bool system ( System  system)
inline

This returns the logging status for the given system.

Parameters
systemThe logging system.
Returns
true if the system is on, false otherwise.
void system ( System  system,
bool  enabled 
)
inline

This enables or disables logging for the given system.

Parameters
systemThe logging system.
enabledtrue to enable the system, false to disable it.

The documentation for this class was generated from the following file: