@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | } else { |
| 46 | 46 | $configMap = $this->parseConfig($config); |
| 47 | 47 | if ($configMap === null) { |
| 48 | - throw new LoggerException("Log config file does not exist: " . $config); |
|
| 48 | + throw new LoggerException("Log config file does not exist: ".$config); |
|
| 49 | 49 | } |
| 50 | 50 | } |
| 51 | 51 | |
@@ -53,11 +53,11 @@ discard block |
||
| 53 | 53 | $this->ioContainer = new Container(); |
| 54 | 54 | |
| 55 | 55 | $rootDir = $this->getApplicationRoot(); |
| 56 | - $this->ioContainer->file = function () use ($rootDir, $configMap) { |
|
| 56 | + $this->ioContainer->file = function() use ($rootDir, $configMap) { |
|
| 57 | 57 | if (!array_key_exists("path", $configMap)) { |
| 58 | 58 | throw new LoggerException("Log path must be defined."); |
| 59 | 59 | } |
| 60 | - return new File($rootDir . "/" . $configMap["path"]); |
|
| 60 | + return new File($rootDir."/".$configMap["path"]); |
|
| 61 | 61 | }; |
| 62 | 62 | |
| 63 | 63 | $this->configMap = $configMap; |
@@ -110,11 +110,11 @@ discard block |
||
| 110 | 110 | { |
| 111 | 111 | $file = $this->ioContainer->file; |
| 112 | 112 | if (!($file->exists() && $file->isFile())) { |
| 113 | - throw new LoggerException("Log directory does not exist: " . $file->getFilePath()); |
|
| 113 | + throw new LoggerException("Log directory does not exist: ".$file->getFilePath()); |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | $this->logContainer->logPath = $file->getFilePath(); |
| 117 | - $this->logContainer->statusPath = preg_replace_callback('/(.*)\..+/', function ($matches) { |
|
| 117 | + $this->logContainer->statusPath = preg_replace_callback('/(.*)\..+/', function($matches) { |
|
| 118 | 118 | return "$matches[1].status"; |
| 119 | 119 | }, $this->logContainer->logPath); |
| 120 | 120 | |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | $rotateCycle = $this->cycle2value($this->configMap["rotate_cycle"]); |
| 132 | 132 | // 妥当なローテートサイクルか |
| 133 | 133 | if ($rotateCycle === 0) { |
| 134 | - throw new LoggerException("Invalid log rotate cycle: " . $this->configMap["rotate_cycle"]); |
|
| 134 | + throw new LoggerException("Invalid log rotate cycle: ".$this->configMap["rotate_cycle"]); |
|
| 135 | 135 | } |
| 136 | 136 | $this->logContainer->rotateCycle = $rotateCycle; |
| 137 | 137 | } |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | $rotateSize = intval($this->configMap["rotate_size"]); |
| 150 | 150 | // ローテートサイズが不正の場合(正の整数以外の値が設定された場合) |
| 151 | 151 | if ($rotateSize <= 0) { |
| 152 | - throw new LoggerException("Invalid log rotate size: " . $this->configMap["rotate_size"]); |
|
| 152 | + throw new LoggerException("Invalid log rotate size: ".$this->configMap["rotate_size"]); |
|
| 153 | 153 | } |
| 154 | 154 | $this->logContainer->rotateSize = $rotateSize; |
| 155 | 155 | } |