@@ -185,6 +185,7 @@ |
||
185 | 185 | /** |
186 | 186 | * ログローテートサイクルを時間に変換 |
187 | 187 | * @param string ローテートサイクル |
188 | + * @param string $cycle |
|
188 | 189 | * @return int ローテート時間 |
189 | 190 | * @throws LoggerException |
190 | 191 | */ |
@@ -74,11 +74,11 @@ |
||
74 | 74 | public function load() |
75 | 75 | { |
76 | 76 | $this->loadLogLevel() |
77 | - ->loadLogFilePath() |
|
78 | - ->loadRotateCycle() |
|
79 | - ->loadRotateSize() |
|
80 | - ->loadApplicationName() |
|
81 | - ->loadFormat(); |
|
77 | + ->loadLogFilePath() |
|
78 | + ->loadRotateCycle() |
|
79 | + ->loadRotateSize() |
|
80 | + ->loadApplicationName() |
|
81 | + ->loadFormat(); |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | /** |
@@ -48,13 +48,13 @@ discard block |
||
48 | 48 | $this->logContainer = new Container(false); |
49 | 49 | $this->ioContainer = new Container(); |
50 | 50 | |
51 | - $this->ioContainer->file = function () use ($configMap) { |
|
51 | + $this->ioContainer->file = function() use ($configMap) { |
|
52 | 52 | if (!array_key_exists("path", $configMap)) { |
53 | 53 | throw new LoggerException("Log path must be defined."); |
54 | 54 | } |
55 | 55 | return new File($configMap["path"]); |
56 | 56 | }; |
57 | - $this->ioContainer->fileWriter = function () use ($configMap) { |
|
57 | + $this->ioContainer->fileWriter = function() use ($configMap) { |
|
58 | 58 | return new SimpleFileWriter($configMap["path"]); |
59 | 59 | }; |
60 | 60 | |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | } |
113 | 113 | |
114 | 114 | $this->logContainer->logPath = $file->getFilePath(); |
115 | - $this->logContainer->statusPath = preg_replace_callback('/(.*)\..+/', function ($matches) { |
|
115 | + $this->logContainer->statusPath = preg_replace_callback('/(.*)\..+/', function($matches) { |
|
116 | 116 | return "$matches[1].status"; |
117 | 117 | }, $this->logContainer->logPath); |
118 | 118 |
@@ -74,13 +74,13 @@ |
||
74 | 74 | |
75 | 75 | $this->ioContainer = new Container(); |
76 | 76 | |
77 | - $this->ioContainer->statusReader = function () use ($statusFile) { |
|
77 | + $this->ioContainer->statusReader = function() use ($statusFile) { |
|
78 | 78 | return new FileReader($statusFile); |
79 | 79 | }; |
80 | - $this->ioContainer->statusWriter = function () use ($statusFile) { |
|
80 | + $this->ioContainer->statusWriter = function() use ($statusFile) { |
|
81 | 81 | return new SimpleFileWriter($statusFile->getFilePath()); |
82 | 82 | }; |
83 | - $this->ioContainer->logWriter = function () use ($logFile) { |
|
83 | + $this->ioContainer->logWriter = function() use ($logFile) { |
|
84 | 84 | return new SimpleFileWriter($logFile->getFilePath()); |
85 | 85 | }; |
86 | 86 |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | |
122 | 122 | /** |
123 | 123 | * インスタンスを返却する |
124 | - * @return WebStream\Module\Logger ロガーインスタンス |
|
124 | + * @return Logger ロガーインスタンス |
|
125 | 125 | */ |
126 | 126 | public static function getInstance() |
127 | 127 | { |
@@ -207,6 +207,8 @@ discard block |
||
207 | 207 | * @param string ログレベル文字列 |
208 | 208 | * @param string 出力文字列 |
209 | 209 | * @param array<mixed> 埋め込み値リスト |
210 | + * @param integer $level |
|
211 | + * @param string $msg |
|
210 | 212 | */ |
211 | 213 | public function write($level, $msg, $context = null) |
212 | 214 | { |
@@ -303,6 +305,8 @@ discard block |
||
303 | 305 | * ローテートを実行する |
304 | 306 | * @param integer 作成日時のUnixTime |
305 | 307 | * @param integer 現在日時のUnixTime |
308 | + * @param integer $from |
|
309 | + * @param integer $to |
|
306 | 310 | */ |
307 | 311 | private function runRotate($from, $to) |
308 | 312 | { |