Table of Contents Previous Next

Sugar Developer Guide

Version 5.1


Chapter 2 Application Framework : Logger : Logger Level

Logger Level
The logger level determines how much information is written to the sugarcrm.log file. You will find the sugarcrm.log file in the root of your Sugar installation.
Valid values are 'debug', 'info', 'error', 'fatal', 'security', and 'off'. The logger will log information for the specified and higher logging levels. For example if you set the log level to 'error' then you would see logs for 'error', 'fatal', and 'security'. You also may define your own log levels on the fly. For example if you set the value to 'test' then only values logged to $GLOBALS['log']->test('This is my test log message'); would be logged. You should avoid using the logging level of ‘off’. The default value is 'fatal'.
$GLOBALS['sugar_config']['logger']['level'] = 'debug';
 
You can also force the log level in your code by using:
$GLOBALS['log']->setLevel('debug');
 

Table of Contents Previous Next

Copyright 2004-2008 SugarCRM Inc.
Product License