ModSnmp Manual v3.07 - 11. Logging
The Logging page is used to configure the logging of error and information messages.
The messages generated by ModSnmp are categorized into levels:
Fatal: Messages about errors that are so serious that ModSnmp cannot continue running.
Error: Messages about errors that may be recoverable, i.e. ModSnmp will attempt to continue running.
Warn: Messages about potential problems.
Info: Messages about the normal operation of ModSnmp.
Trace: Tracing of Modbus and SNMP messages.
ModSnmp can log messages to four different destinations: Terminal, File, Syslog and Windows. You may log messages to more than one destination, with a different level for each destination.
For each destination, you should select the level of messages to be logged to that destination. When you select a particular level, messages of that level and higher levels will be logged. For example, if you select Warn then messages from the levels Warn, Error and Fatal will be logged. Select None if no messages are to be logged to that destination.
The destinations are:
Terminal: This is a window, which is displayed automatically when you start ModSnmp with a GUI. If you close the logging window, you can re-open it using the → menu option.
By default, this destination is set to level Trace to help with initial configuration of ModSnmp.
File: This is a text file. You will have to enter the name of the file in the File Name field, or use the Browse button to open a dialog to browse for the file.
ModSnmp will append messages to the file, so output from previous runs of the program will not get lost.
You may limit the size of the log file by entering a non-zero value in the Maximum file size (MB) field. Enter 0 if you do not want to limit the file size. If the log file grows bigger than the size limit, ModSnmp will rename the log file by adding the suffix ".bak", and start a new log file with the specified name.
Syslog: This is the system logger available on Unix/Linux systems.
ModSnmp sends messages to the system logger via UDP port 514, which may not be enabled by default. If you are using 'syslogd' for system logging, you can enable UDP port 514 by starting 'syslogd' with a '-r' option. If you are using 'rsyslogd', you can enable UDP port 514 by including the lines:
$ModLoad imudp $UDPServerRun 514
in the file '/etc/rsyslogd.conf'.
ModSnmp uses the '
user' message category ("facility") when sending messages to the system logger.
Windows: This is the event logger available on Windows systems.
Messages of level Info and above are also displayed in ModSnmp's status bar when running with a GUI. If you want to run ModSnmp without a GUI, you must log error messages to at least one of the non-terminal destinations.