Logging

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 file Log.php can be found in the application/config directory. If it's not there it can be copied from the system/config directory. See Configuration for more information.

There are three config settings for Logging:

$config['threshold'] = 0;
 
$config['directory'] = 'logs';
 
$config['format'] = 'Y-m-d H:i:s';

$config['threshold'] can be set at four levels:

When set to 4 it will also log 3, 2 and 1. Lower levels are always included.

Kohana by default, does not log anything to level 2 or 3. Important setting the level to 4 can slow down your application significantly.

$config['directory'] log file directory, relative to application/, or absolute.

$config['format'] format for the timestamps according to date()

general/logging.txt · Last modified: 2008/08/12 13:22 by oscarb