Skip to content

Commit 6e20430

Browse files
committed
update readme
1 parent dae2d61 commit 6e20430

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

readme.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ You will need to add an array under 'channels' for Log-to-DB here like so:
3131
'connection' => 'default',
3232
'collection' => 'log',
3333
'detailed' => true,
34-
'queue' => ''
34+
'queue' => false
3535
'queue_name' => ''
3636
'queue_connection' => ''
3737
]
@@ -51,7 +51,7 @@ This could be copied to your project if you would like edit it with the vendor p
5151
```
5252
php artisan vendor:publish
5353
```
54-
You can also set log-to-db config settings in your .env file, for ex:
54+
You can also set default log-to-db config settings in your .env file, for ex:
5555
```
5656
LOG_DB_CONNECTION='default'
5757
LOG_DB_DETAILED=false
@@ -75,11 +75,22 @@ Log::channel('mongodb')->info("This thing just happened");
7575
This logger works the same as any other across Laravel, for example you can add it to a stack.
7676
You can log multiple levels to multiple DB connections... the possibilities are ENDLESS! 😎
7777

78-
#### Log Worker Queue
78+
#### Config priority order
79+
Lowest number has highest priority (overrides the one below);
80+
1. Log Channel config array in config/logging.php overrides logtodb.php
81+
2. .env File overrides config/logtodb.php file
82+
3. config/logtodb.php is the default config.
83+
84+
### Log Worker Queue
7985
It might be a good idea to save the log events with a Queue Worker. This way your server does not have to wait for
8086
the save process to finish. You would have to configure the Laravel Queue settings and run the Queue listener.
8187
https://laravel.com/docs/5.6/queues#running-the-queue-worker
8288

89+
The queue can be enabled/disabled in any of the following places:
90+
* LOG_DB_QUEUE = true | in .env
91+
* queue_db_saves => true | in config/logtodb.php
92+
* queue => true | in the log channel config array -> config/logging.php
93+
8394
## Usage
8495
Since this is a custom log channel for Laravel, all "standard" ways of generating log events etc should work with
8596
the Laravel Log Facade. See https://laravel.com/docs/5.6/logging for more information.

0 commit comments

Comments
 (0)