From 5114f2ee876ec04255b417b470c8f524f657054e Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 6 Jul 2011 14:49:18 -0700 Subject: [PATCH] Trimming comment bloat in Log class. --- system/log.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/system/log.php b/system/log.php index eba9d5d0..dd736e4f 100644 --- a/system/log.php +++ b/system/log.php @@ -44,20 +44,13 @@ public static function error($message) */ public static function write($type, $message) { - // ----------------------------------------------------- // Create the yearly and monthly directories if needed. - // ----------------------------------------------------- static::make_directory($directory = APP_PATH.'storage/logs/'.date('Y')); static::make_directory($directory .= '/'.date('m')); - // ----------------------------------------------------- - // Each day has its own log file. - // ----------------------------------------------------- + // Get the daily log file filename. $file = $directory.'/'.date('d').EXT; - // ----------------------------------------------------- - // Append to the log file and set the permissions. - // ----------------------------------------------------- file_put_contents($file, date('Y-m-d H:i:s').' '.$type.' - '.$message.PHP_EOL, LOCK_EX | FILE_APPEND); chmod($file, 0666);