diff options
Diffstat (limited to 'lib/private/Log')
-rw-r--r-- | lib/private/Log/File.php | 4 | ||||
-rw-r--r-- | lib/private/Log/Rotate.php | 3 | ||||
-rw-r--r-- | lib/private/Log/Syslog.php | 12 |
3 files changed, 12 insertions, 7 deletions
diff --git a/lib/private/Log/File.php b/lib/private/Log/File.php index 2d7e4b6c14f..755c4729c7a 100644 --- a/lib/private/Log/File.php +++ b/lib/private/Log/File.php @@ -37,6 +37,8 @@ namespace OC\Log; +use OCP\ILogger; + /** * logging utilities * @@ -159,7 +161,7 @@ class File { */ public static function getEntries($limit=50, $offset=0) { self::init(); - $minLevel = \OC::$server->getSystemConfig()->getValue("loglevel", \OCP\Util::WARN); + $minLevel = \OC::$server->getSystemConfig()->getValue("loglevel", ILogger::WARN); $entries = array(); $handle = @fopen(self::$logFile, 'rb'); if ($handle) { diff --git a/lib/private/Log/Rotate.php b/lib/private/Log/Rotate.php index 97a772b5251..48b96c98a8d 100644 --- a/lib/private/Log/Rotate.php +++ b/lib/private/Log/Rotate.php @@ -24,6 +24,7 @@ */ namespace OC\Log; +use OCP\ILogger; /** * This rotates the current logfile to a new name, this way the total log usage @@ -49,6 +50,6 @@ class Rotate extends \OC\BackgroundJob\Job { $rotatedLogfile = $logfile.'.1'; rename($logfile, $rotatedLogfile); $msg = 'Log file "'.$logfile.'" was over '.$this->max_log_size.' bytes, moved to "'.$rotatedLogfile.'"'; - \OCP\Util::writeLog(Rotate::class, $msg, \OCP\Util::WARN); + \OCP\Util::writeLog(Rotate::class, $msg, ILogger::WARN); } } diff --git a/lib/private/Log/Syslog.php b/lib/private/Log/Syslog.php index c6ea0a40350..7b3d931ef31 100644 --- a/lib/private/Log/Syslog.php +++ b/lib/private/Log/Syslog.php @@ -25,13 +25,15 @@ namespace OC\Log; +use OCP\ILogger; + class Syslog { static protected $levels = array( - \OCP\Util::DEBUG => LOG_DEBUG, - \OCP\Util::INFO => LOG_INFO, - \OCP\Util::WARN => LOG_WARNING, - \OCP\Util::ERROR => LOG_ERR, - \OCP\Util::FATAL => LOG_CRIT, + ILogger::DEBUG => LOG_DEBUG, + ILogger::INFO => LOG_INFO, + ILogger::WARN => LOG_WARNING, + ILogger::ERROR => LOG_ERR, + ILogger::FATAL => LOG_CRIT, ); /** |