diff options
author | Andrew Dolgov <[email protected]> | 2021-03-06 15:19:31 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-03-06 15:19:31 +0300 |
commit | 270f0c3132ca1fb9105043d9e029bf14c81146fa (patch) | |
tree | 76d4c91f95dfb12d3f1d707ea01095b38fcc2fc8 /classes/debug.php | |
parent | 63651bd91d2a001eed3a76bd2b8e6a89ab6c151d (diff) |
general cleanup, set some type hints
Diffstat (limited to 'classes/debug.php')
-rw-r--r-- | classes/debug.php | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/classes/debug.php b/classes/debug.php index a0dcac35b..2ae81e41a 100644 --- a/classes/debug.php +++ b/classes/debug.php @@ -5,15 +5,22 @@ class Debug { const LOG_VERBOSE = 1; const LOG_EXTENDED = 2; - public static $LOG_DISABLED = -1; - public static $LOG_NORMAL = 0; - public static $LOG_VERBOSE = 1; - public static $LOG_EXTENDED = 2; + /** @deprecated */ + public static $LOG_DISABLED = self::LOG_DISABLED; + + /** @deprecated */ + public static $LOG_NORMAL = self::LOG_NORMAL; + + /** @deprecated */ + public static $LOG_VERBOSE = self::LOG_VERBOSE; + + /** @deprecated */ + public static $LOG_EXTENDED = self::LOG_EXTENDED; private static $enabled = false; private static $quiet = false; private static $logfile = false; - private static $loglevel = 0; + private static $loglevel = self::LOG_NORMAL; public static function set_logfile($logfile) { self::$logfile = $logfile; @@ -39,7 +46,7 @@ class Debug { return self::$loglevel; } - public static function log($message, $level = 0) { + public static function log($message, int $level = 0) { if (!self::$enabled || self::$loglevel < $level) return false; |