@@ -14,8 +14,8 @@ discard block |
||
| 14 | 14 | |
| 15 | 15 | |
| 16 | 16 | if (!defined("LOG_DIR")) { |
| 17 | - GeneratorHelper::createDir(BASE_DIR . DIRECTORY_SEPARATOR . 'logs'); |
|
| 18 | - define("LOG_DIR", BASE_DIR . DIRECTORY_SEPARATOR . 'logs'); |
|
| 17 | + GeneratorHelper::createDir(BASE_DIR.DIRECTORY_SEPARATOR.'logs'); |
|
| 18 | + define("LOG_DIR", BASE_DIR.DIRECTORY_SEPARATOR.'logs'); |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | /** |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | $config = Config::getInstance(); |
| 49 | 49 | $args = func_get_args(); |
| 50 | 50 | list($logger, $debug, $path) = $this->setup($config, $args); |
| 51 | - $this->stream = fopen($path . DIRECTORY_SEPARATOR . date("Ymd") . ".log", "a+"); |
|
| 51 | + $this->stream = fopen($path.DIRECTORY_SEPARATOR.date("Ymd").".log", "a+"); |
|
| 52 | 52 | $this->addPushLogger($logger, $debug, $config); |
| 53 | 53 | $this->log_level = Config::getParam('log.level', 'info'); |
| 54 | 54 | } |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | private function createLoggerPath(Config $config) |
| 203 | 203 | { |
| 204 | 204 | $logger = $this->setLoggerName($config); |
| 205 | - $path = LOG_DIR . DIRECTORY_SEPARATOR . $logger . DIRECTORY_SEPARATOR . date('Y') . DIRECTORY_SEPARATOR . date('m'); |
|
| 205 | + $path = LOG_DIR.DIRECTORY_SEPARATOR.$logger.DIRECTORY_SEPARATOR.date('Y').DIRECTORY_SEPARATOR.date('m'); |
|
| 206 | 206 | GeneratorHelper::createDir($path); |
| 207 | 207 | |
| 208 | 208 | return $path; |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | */ |
| 262 | 262 | private function addMinimalContext($context = []) |
| 263 | 263 | { |
| 264 | - if(!is_array($context)) { |
|
| 264 | + if (!is_array($context)) { |
|
| 265 | 265 | $context = []; |
| 266 | 266 | } |
| 267 | 267 | $context['uri'] = null !== $_SERVER && array_key_exists('REQUEST_URI', $_SERVER) ? $_SERVER['REQUEST_URI'] : 'Unknow'; |