20.0 Logging in SNMP Agent

 


20.1 Overview

20.2 Logging Levels

20.3 Setting Logging Levels

20.4 Viewing Log Reports


 

20.1 Overview

 

Log messages or Debug messages produces details of the Agent processing. These messages help in tracing out the problems or issues faced while working with the Agent. They get stored in a text file and provide information that you require from the Agent. This comfort of receiving debug messages would be beneficial while testing the developed Agents.

Before learning to enable the logging facility, you have to know the various logging levels.

 

20.2 Logging Levels

 

The Logging options available for SNMP Agents are as follows :

20.3 Setting Logging Levels

 

The logging levels can be enabled, either using MIB Compiler UI or using API Calls.

 

Using MIB Compiler UI

Using API Calls

 

By default, the Agent generates code for debugging messages in the init method of the Main file as,

 

int debugLevel = com.adventnet.agent.logging.Level.WARN;

 

This debug level can be changed by making WARN to whichever level you prefer.

 

20.4 Viewing Logging Reports

 

Copyright © 2013, ZOHO Corp. All Rights Reserved.