Loggin settings (debug.conf)


All the software products based on COREmanager have a single logging system. The logs are saved into the var directory. When it reaches the maximum size (the default value is 100 MB) the contents of the log directory is moved to var/logs and compressed. A suffix containing the data and time when the archive was created as well as a numerical order (in case the log will be moved several times during one second) are added to its name. The original file will be cut and the first string will contain the name of the newly created archive.  

COREmanager allows for flexible configuration of logging settings. The settings are specified in etc/debug.conf. It may contain comments (all the information after #), global settings (they start with the prefix SET), and details for every specified product and module. 

The global settings include:

max_log_size is the maximum size to which a log file can grow before the control panel rotates it to  var/logs

color - use/do not use colored logs (possible values are on/off, the default value is on) possible values: file (add into the log file), console (send to stdout)


SET color=off # disable coloured logd
SET mgrctl.max_log_size=1048576 # set the maximum log size for  var/mgrctl.log to 1 MB

Specification format:

<log name>[.<module name>] <loggin level> [additional conditions]

a log file name in the var directory. As a rule,  it matches the name of the binary file that writes this file.

a module name  - different components of the libmgr and libispapi libraries have different internal names. Eg, for the integration of a control panel with external services it can be useful to set the maximum logging level for the rpc module;

a logging level is a whole number from 0 (do not write any information) to 9 (maximum details);

additional conditions - increase the logging level for certain calls.  E.g. you can set it only for the calls sent from a certain user or certain IP address. Conditions can be set only for control panel logs. Possible values: realuser, user, level, ip, action, id, displayname, realdisplayname.


* 6 # set the loggingl level to 6 for all modules
mgrctl.* 5 # set the logging level to 5 for mgrctl.log
core.* 9 ip= # set the logging level to 9 for core.log only for the calls from
core.* 9 user~test # set the logging level to 9 for core.log only for the calls from the users which name contains test

If you have created several competitive rules, the rules that contain a module name have a larger priority than general rules. If you have created several rules for a certain module, the rule with the maximum details will be applied. 

The system reads the logging settings when starting the application. You can  make the control panel re-read the settings by sending HUP