| @@ 220-227 (lines=8) @@ | ||
| 217 | * |
|
| 218 | * @return \Psr\Log\LoggerInterface |
|
| 219 | */ |
|
| 220 | protected function createDailyDriver(array $config) |
|
| 221 | { |
|
| 222 | return new Monolog($this->parseChannel($config), [ |
|
| 223 | $this->prepareHandler(new RotatingFileHandler( |
|
| 224 | $config['path'], $config['days'] ?? 7, $this->level($config) |
|
| 225 | )), |
|
| 226 | ]); |
|
| 227 | } |
|
| 228 | ||
| 229 | /** |
|
| 230 | * Create an instance of the Slack log driver. |
|
| @@ 259-266 (lines=8) @@ | ||
| 256 | * |
|
| 257 | * @return \Psr\Log\LoggerInterface |
|
| 258 | */ |
|
| 259 | protected function createSyslogDriver(array $config) |
|
| 260 | { |
|
| 261 | return new Monolog($this->parseChannel($config), [ |
|
| 262 | $this->prepareHandler(new SyslogHandler( |
|
| 263 | 'EasyWeChat', $config['facility'] ?? LOG_USER, $this->level($config)) |
|
| 264 | ), |
|
| 265 | ]); |
|
| 266 | } |
|
| 267 | ||
| 268 | /** |
|
| 269 | * Create an instance of the "error log" log driver. |
|
| @@ 275-282 (lines=8) @@ | ||
| 272 | * |
|
| 273 | * @return \Psr\Log\LoggerInterface |
|
| 274 | */ |
|
| 275 | protected function createErrorlogDriver(array $config) |
|
| 276 | { |
|
| 277 | return new Monolog($this->parseChannel($config), [ |
|
| 278 | $this->prepareHandler(new ErrorLogHandler( |
|
| 279 | $config['type'] ?? ErrorLogHandler::OPERATING_SYSTEM, $this->level($config)) |
|
| 280 | ), |
|
| 281 | ]); |
|
| 282 | } |
|
| 283 | ||
| 284 | /** |
|
| 285 | * Prepare the handlers for usage by Monolog. |
|