Line 16:
Line 16:
= Functions =
= Functions =
Following function allows to log informations in Dolibarr log file
Following function allows to log informations in Dolibarr log file
−
<source lang="php">dol_syslog($message, LOG_DEBUG|LOG_INFO|LOG_WARNING|LOG_ERR);</source>
+
<syntaxHighlight lang="php">dol_syslog($message, LOG_DEBUG|LOG_INFO|LOG_WARNING|LOG_ERR);</syntaxHighlight>
The log level is related to setup defined in module Syslog (see lower).
The log level is related to setup defined in module Syslog (see lower).
Following function can be used to add error information on screen. Usage must be reserved in never reached code.
Following function can be used to add error information on screen. Usage must be reserved in never reached code.
−
<source lang="php">dol_print_error($db,texte);</source>
+
<syntaxHighlight lang="php">dol_print_error($db,texte);</syntaxHighlight>
= Module Syslog =
= Module Syslog =
Line 43:
Line 43:
== Apache ==
== Apache ==
Note that you can have also find some technical PHP/Apache errors in apache log file (whatever is status/setup of this module). But this occurs only if there is a technical problem in your installation: On a typical Linux install, such logs will be available somewhere in '''/var/log/apache[2]/[dolibarr]-error.log'''. You can watch it ''live'' from the terminal by using:
Note that you can have also find some technical PHP/Apache errors in apache log file (whatever is status/setup of this module). But this occurs only if there is a technical problem in your installation: On a typical Linux install, such logs will be available somewhere in '''/var/log/apache[2]/[dolibarr]-error.log'''. You can watch it ''live'' from the terminal by using:
−
<source lang="bash">tail -f /var/log/apache2/dolibarr-error.log</source>
+
<syntaxHighlight lang="bash">tail -f /var/log/apache2/dolibarr-error.log</syntaxHighlight>
== Nginx ==
== Nginx ==
If you are using nginx to serve Dolibarr some useful debugging information is often to be found there.
If you are using nginx to serve Dolibarr some useful debugging information is often to be found there.
−
<source lang="bash">tail -f /var/log/nginx/error.log</source>
+
<syntaxHighlight lang="bash">tail -f /var/log/nginx/error.log</syntaxHighlight>