File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,33 @@ In progress...
116
116
117
117
## Advanced
118
118
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
+
119
146
Sometimes it' s needed to change location of the log files, for example, you want it to be dependent on some command' s argument.
120
147
If that is your case, just override `getLogPath` method in your command class:
121
148
You can’t perform that action at this time.
0 commit comments