31,034
edits
mNo edit summary Tag: 2017 source edit |
m (→Module Syslog) Tag: 2017 source edit |
||
| (One intermediate revision by one other user not shown) | |||
| Line 4: | Line 4: | ||
[[fr:Gestion_d'erreur]] | [[fr:Gestion_d'erreur]] | ||
[[es:Gestión_de_errores]] | [[es:Gestión_de_errores]] | ||
[[zh:错误处理]] | |||
<!-- END interlang links --> | <!-- END interlang links --> | ||
[[Category:Core]] | [[Category:Core]] | ||
{{TemplateDocDevEn}} | {{TemplateDocDevEn}} | ||
= Functions = | = Functions = | ||
| Line 22: | Line 18: | ||
<syntaxHighlight lang="php">dol_print_error($db,texte);</syntaxHighlight> | <syntaxHighlight lang="php">dol_print_error($db,texte);</syntaxHighlight> | ||
= Module Syslog = | = Module Log Debug (also called Syslog) = | ||
The error reporting module is integrated with other Dolibarr modules. It allows you to configure what level of errors you would like to be reported and where. | The error reporting module is integrated with other Dolibarr modules. It allows you to configure what level of errors you would like to be reported and where. | ||
| Line 34: | Line 30: | ||
The next option, '''file''', allows you to choose a file in which you will store the logs. The path you will indicate there should be relative to the system root (/). If you live it as it is (default option DOL_DOCUMENT_ROOT/dolibarr.log), it will likely be opened in document directory. Of course, to do that, your web server must have write permissions on the directory you are using. | The next option, '''file''', allows you to choose a file in which you will store the logs. The path you will indicate there should be relative to the system root (/). If you live it as it is (default option DOL_DOCUMENT_ROOT/dolibarr.log), it will likely be opened in document directory. Of course, to do that, your web server must have write permissions on the directory you are using. | ||
Generally, the '''file''' facility will work more easily because it doesn't depend on your server configuration (or only for the directory that needs to be | Generally, the '''file''' facility will work more easily because it doesn't depend on your server configuration (or only for the directory that needs to be writable). | ||
Finally, the level of reporting is how many types of errors you want to report. LOG_DEBUG(7) is the strongest option, reporting pretty much everything that calls a dol_syslog() function. LOG_EMERG(0) is the opposite, letting you see only the errors that would really block your system. | Finally, the level of reporting is how many types of errors you want to report. LOG_DEBUG(7) is the strongest option, reporting pretty much everything that calls a dol_syslog() function. LOG_EMERG(0) is the opposite, letting you see only the errors that would really block your system. | ||