diff options
author | n-peugnet <n.peugnet@free.fr> | 2020-05-10 16:46:45 +0200 |
---|---|---|
committer | n-peugnet <n.peugnet@free.fr> | 2020-05-11 16:10:08 +0200 |
commit | 2f8105cabf63f3ef3d4a59c306f4e1403d3c5164 (patch) | |
tree | df35dfe1e9b883c9b6a7e54d16961ab0df38926d /app/class/Logger.php | |
parent | aee12a9f372d839cfbbf3005245b0d691cfdbb4b (diff) | |
download | wcms-2f8105cabf63f3ef3d4a59c306f4e1403d3c5164.tar.gz wcms-2f8105cabf63f3ef3d4a59c306f4e1403d3c5164.zip |
fix: log file was not closed
Diffstat (limited to 'app/class/Logger.php')
-rw-r--r-- | app/class/Logger.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/class/Logger.php b/app/class/Logger.php index e2ab4b6..beceddb 100644 --- a/app/class/Logger.php +++ b/app/class/Logger.php @@ -38,6 +38,14 @@ class Logger self::$verbosity = $verbosity; } + public static function close() + { + if (self::$file !== false) { + fclose(self::$file); + self::$file = false; + } + } + protected static function write(string $level, string $msg, array $args = []) { $caller = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2)[1]; |