This is documentation for Kohana v2.3.x. For v3.x documentation, see .


System and PHP errors are written to an application log file. For information on writing log messages or accessing log files, see Kohana Log methods.

The configuration settings for logging are accessible in the core configuration file config.php located in application/config. See Configuration for more information.

There are only two config settings for Logging:

 * Log thresholds:
 *  0 - Disable logging
 *  1 - Errors and exceptions
 *  2 - Warnings
 *  3 - Notices
 *  4 - Debugging
$config['log_threshold'] = 1;
 * Message logging directory.
$config['log_directory'] = APPPATH.'logs';

When log_threshold is set to 4 it will also log 3, 2 and 1, since lower levels are always included.

Kohana by default, does not log anything to level 2 or 3.

$config['log_directory'] log file directory can be relative to application/ or absolute.

<box red |Important> Setting the level to 4 can slow down your application significantly. </box>

Note that these levels correspond to Kohana::log(level, message) calls as such:

general/logging.txt · Last modified: 2010/04/27 20:51 by synapsestudios