Skip to content

Commit 55ab4d8

Browse files
committed
ICL: Readme minor fixes.
1 parent 3207b40 commit 55ab4d8

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

README.md

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,9 @@ Provides logging and notifications for Laravel console commands.
4848
2. Use `Illuminated\Console\Loggable` trait:
4949

5050
```php
51-
namespace App\Console\Commands;
52-
53-
use Illuminate\Console\Command;
5451
use Illuminated\Console\Loggable;
5552
56-
class MyLoggableCommand extends Command
53+
class ExampleCommand extends Command
5754
{
5855
use Loggable;
5956
@@ -69,7 +66,7 @@ Provides logging and notifications for Laravel console commands.
6966
3. Now your command is loggable!
7067

7168
```
72-
[2016-05-11 17:19:21]: [INFO]: Command `App\Console\Commands\MyLoggableCommand` initialized.
69+
[2016-05-11 17:19:21]: [INFO]: Command `App\Console\Commands\ExampleCommand` initialized.
7370
[2016-05-11 17:19:21]: [INFO]: Host: `MyHost.local` (`10.0.1.1`).
7471
[2016-05-11 17:19:21]: [INFO]: Database host: `MyHost.local`, port: `3306`, ip: ``.
7572
[2016-05-11 17:19:21]: [INFO]: Database date: `2016-05-11 17:19:21`.
@@ -112,7 +109,7 @@ As you can see, each command has a separate folder for it's logs. Also, you get
112109
By default, only latest thirty log files are stored. However, you can override this behavior as you wish:
113110
114111
```php
115-
class MyLoggableCommand extends Command
112+
class ExampleCommand extends Command
116113
{
117114
use Loggable;
118115
@@ -147,7 +144,7 @@ Email channel provides notifications via email.
147144
Basically, the only thing you have to do is specify recipients. Set recipients and email notifications are ready to go!
148145
149146
```php
150-
class MyLoggableCommand extends Command
147+
class ExampleCommand extends Command
151148
{
152149
use Loggable;
153150
@@ -173,7 +170,7 @@ You'll get a lot of similar emails in those cases. Email notifications deduplica
173170
Disabled by default, it can be enabled and also adjusted time in seconds, for which deduplication works.
174171

175172
```php
176-
class MyLoggableCommand extends Command
173+
class ExampleCommand extends Command
177174
{
178175
use Loggable;
179176
@@ -204,7 +201,7 @@ Database channel provides saving of notifications into the database.
204201
Disabled by default, it can be easily enabled be the proper method.
205202
206203
```php
207-
class MyLoggableCommand extends Command
204+
class ExampleCommand extends Command
208205
{
209206
use Loggable;
210207
@@ -222,7 +219,7 @@ Surely, you can change the table name or even the logic of notification saving b
222219
useful if you want to add some custom fields to notifications table. Here is the basic example of what it may look like:
223220

224221
```php
225-
class MyLoggableCommand extends Command
222+
class ExampleCommand extends Command
226223
{
227224
use Loggable;
228225
@@ -267,7 +264,7 @@ However, if you want to pass an additional context, use `Illuminated\Console\Exc
267264
```php
268265
use Illuminated\Console\Exceptions\RuntimeException;
269266
270-
class MyLoggableCommand extends Command
267+
class ExampleCommand extends Command
271268
{
272269
use Loggable;
273270
@@ -289,7 +286,7 @@ class MyLoggableCommand extends Command
289286
array:5 [
290287
"code" => 0
291288
"message" => "Oooups! Houston, we have a problem!"
292-
"file" => "/Applications/MAMP/htdocs/icl-test/app/Console/Commands/MyLoggableCommand.php"
289+
"file" => "/Applications/MAMP/htdocs/icl-test/app/Console/Commands/ExampleCommand.php"
293290
"line" => 22
294291
"context" => array:3 [
295292
"some" => 123
@@ -358,7 +355,7 @@ If needed, you may access the underlying Monolog instance in a two ways:
358355
- Using `icLogger` command's method:
359356
360357
```php
361-
class MyLoggableCommand extends Command
358+
class ExampleCommand extends Command
362359
{
363360
use Loggable;
364361
@@ -398,7 +395,7 @@ trait Loggable
398395
If your command is overriding `initialize` method too, then you should call `initializeLogging` method by yourself:
399396
400397
```php
401-
class MyLoggableCommand extends Command
398+
class ExampleCommand extends Command
402399
{
403400
use Loggable;
404401
@@ -421,7 +418,7 @@ If you're using some other cool `illuminated/console-%` packages, well, then you
421418
For example, if you're trying to build loggable command, which is [protected against overlapping](https://github.com/dmitry-ivanov/laravel-console-mutex):
422419
423420
```php
424-
class MyLoggableCommand extends Command
421+
class ExampleCommand extends Command
425422
{
426423
use Loggable;
427424
use WithoutOverlapping;
@@ -436,7 +433,7 @@ You'll get fatal error, the "traits conflict", because both of these traits are
436433
But don't worry, solution is very simple. Override `initialize` method by yourself, and initialize traits in required order:
437434
438435
```php
439-
class MyLoggableCommand extends Command
436+
class ExampleCommand extends Command
440437
{
441438
use Loggable;
442439
use WithoutOverlapping;

0 commit comments

Comments
 (0)