Skip to content

Commit b4627e9

Browse files
committed
ICL: Readme info added.
1 parent 74e0c51 commit b4627e9

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,33 @@ In progress...
116116
117117
## Advanced
118118
119+
#### Accessing Monolog instance
120+
121+
This package is using [Monolog](https://packagist.org/packages/monolog/monolog) logging library with all of it's power.
122+
If needed, you may access the underlying Monolog instance in a two ways:
123+
124+
- Using `icLogger` command's method:
125+
```php
126+
class Foo extends Command
127+
{
128+
use Loggable;
129+
130+
public function handle()
131+
{
132+
$log = $this->icLogger();
133+
}
134+
135+
// ...
136+
}
137+
```
138+
139+
- Through Laravel service container:
140+
```php
141+
$log = $app('log.iclogger');
142+
```
143+
144+
#### Custom location
145+
119146
Sometimes it's needed to change location of the log files, for example, you want it to be dependent on some command's argument.
120147
If that is your case, just override `getLogPath` method in your command class:
121148

0 commit comments

Comments
 (0)