| Total Complexity | 3 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 9 | trait HasChannels |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * The array of resolved channels. |
||
| 13 | * |
||
| 14 | * @var array |
||
| 15 | */ |
||
| 16 | protected $channels = []; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Get a log channel instance. |
||
| 20 | * |
||
| 21 | * @param string|null $channel |
||
| 22 | * @return \Psr\Log\LoggerInterface |
||
| 23 | */ |
||
| 24 | 1 | public function channel($channel = null) |
|
| 25 | { |
||
| 26 | 1 | return $this->driver($channel); |
|
|
|
|||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Extract the log channel from the given configuration. |
||
| 31 | * |
||
| 32 | * @param array $config |
||
| 33 | * @return string |
||
| 34 | */ |
||
| 35 | 3 | protected function parseChannel(array $config) |
|
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Get fallback log channel name. |
||
| 42 | * |
||
| 43 | * @return string |
||
| 44 | */ |
||
| 45 | 3 | protected function getFallbackChannelName() |
|
| 48 | // return $this->app->bound('env') ? $this->app->environment() : 'production'; |
||
| 49 | } |
||
| 51 |