diff --git a/core/log.class.inc.php b/core/log.class.inc.php index a14ace76f..33a32a9fc 100644 --- a/core/log.class.inc.php +++ b/core/log.class.inc.php @@ -542,7 +542,12 @@ abstract class LogAPI const LEVEL_OK = 'Ok'; const LEVEL_DEBUG = 'Debug'; const LEVEL_TRACE = 'Trace'; - const LEVEL_DEFAULT = self::LEVEL_TRACE; + /** + * @var string default log level, can be overrided + * @see GetMinLogLevel + * @since 2.7.1 N°2977 + */ + const LEVEL_DEFAULT = self::LEVEL_OK; protected static $aLevelsPriority = array( self::LEVEL_ERROR => 400, @@ -640,21 +645,22 @@ abstract class LogAPI /** * @param $sChannel * - * @return mixed|null + * @return string one of the LEVEL_* const value + * @uses LEVEL_DEFAULT */ private static function GetMinLogLevel($sChannel) { $oConfig = (static::$m_oMockMetaModelConfig !== null) ? static::$m_oMockMetaModelConfig : \MetaModel::GetConfig(); if (!$oConfig instanceof Config) { - return self::LEVEL_DEFAULT; + return static::LEVEL_DEFAULT; } $sLogLevelMin = $oConfig->Get('log_level_min'); if (empty($sLogLevelMin)) { - return self::LEVEL_DEFAULT; + return static::LEVEL_DEFAULT; } if (!is_array($sLogLevelMin)) @@ -672,7 +678,7 @@ abstract class LogAPI return $sLogLevelMin[$sChannel]; } - return self::LEVEL_DEFAULT; + return static::LEVEL_DEFAULT; } }