00001 <?php
00002
00003
00004
00005
00006
00007
00008 class Logger {
00009
00010
00011
00012
00013
00014
00015 public static function log($file, $data) {
00016 $file = Config::get_value(Config::TEMP_DIR) . 'log/' . date('Y-m-d', time()) . '_' . $file . '.log';
00017 $handle = @fopen($file, 'a');
00018 if ($handle) {
00019 $log = array_merge(array(date('Y/m/d, H:i:s', time()), Url::current()->build()), Arr::force($data));
00020 @fwrite($handle, '"' . implode('";"', $log) . "\"\n");
00021 @fclose($handle);
00022 }
00023 }
00024 }