====== Logging ====== [[https://www.patreon.com/posts/better-logging-44629895|Introductory Blog Post]]. ===== Logging Facilities ===== Logging facilities categorize logged Error messages. They correspond to directories in the ''data/log/'' directory. Plugins may use their own facilities. [[:DokuWiki]] defines three logging facilities by default: * ''error'' -- anything that should not happen and is the result of a problem with the code, environment, configuration or user interaction. * ''deprecated'' -- logs the use of deprecated code. The stack trace should help identifying the code that needs to be updated * ''debug'' -- messages that help during development or configuration but are usually not needed Which facilities actually should be logged can be configured through the [[config:dontlog]] option. if you only need to write errors only, without deprecated, and debug, then the line in file ''conf/dokuwiki.php'' must look like this ''$conf['dontlog'] = 'deprecated,debug';'' ===== Automatic Error Logging ===== DokuWiki registers error handlers that will automatically try to catch all run-away exception, errors and fatals. It will display an informatory message to the end user and log the error to the ''error'' facility. ===== Log Format ===== FIXME ===== Custom Logging ===== FIXME