Module Syslog (developer)

= Fonction du module =

This module allows to enable technical logging into Dolibarr. Logging is used to save messages into log files :


 * Into a file
 * File will be by default DOL_DATA_ROOT/dolibarr.log (for example C:/dolibarr/documents/dolibarr.log).
 * You can change file name on the setup page of module.
 * Into systems logs (using syslog)

See module setup to choose.

= PHP functions =

Definition
To use loggin in your PHP coding, you must use the following function :

This function is defined into file dolibarr/htdocs/lib/functions.lib.php

Parameters

 * $message : string with message to write into log file
 * $level : constant that define level of message. It can have following values:
 * On Windows server: LOG_ERR=4, LOG_WARNING=5, LOG_NOTICE=LOG_INFO=LOG_DEBUG=6
 * On Unix/Linux server : LOG_ERR=3, LOG_WARNING=4, LOG_INFO=6, LOG_DEBUG=7
 * You can then set the level of messages you want to write, with the module setup page.

= Notes =

"Syslog functions are bugged with Windows et generates memory protection fault.

''To solve this, use the file logging instead of syslog logging (see module setup page).

If SYSLOG_FILE_NO_ERROR is defined in your PHP code, no message will be output on screen when there is an error when writing the log message."''

Source: documentation Doxygen

= See also =

Doxygen Documentation :