Log level customization

Smart Polling logs self-diagnostic information about its operations and activities during execution.

When Smart Polling logs self-diagnostic information, the logs are collected in the /data/log/n2os/ n2ossp.log file.

To change the level of detail in the logs, you can add these lines to the configuration file:
/data/cfg/n2os.conf.user:
sp log_level <LEVEL>
where <LEVEL> is one of the following values (in increasing order of verbosity):
  • FATAL
  • ERROR
  • WARN
  • INFO
  • DEBUG
Note: The default value is INFO.
After you have changed and saved the file, you can restart Smart Polling with the command:
service n2ossp stop
Note: The service automatically restarts after the execution of this command.
To configure the file to see only ERROR and FATAL messages, in the /data/cfg/n2os.conf.user file, you can add this rule:
sp log_level ERROR
then restart the process with the command:
service n2ossp stop
Note: The configured level is the minimum to be printed, so ERROR will print log lines for both ERROR and FATAL messages, whereas FATAL will print log lines only for FATAL messages.