@@ -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```
5252php 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```
5656LOG_DB_CONNECTION='default'
5757LOG_DB_DETAILED=false
@@ -75,11 +75,22 @@ Log::channel('mongodb')->info("This thing just happened");
7575This logger works the same as any other across Laravel, for example you can add it to a stack.
7676You 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
7985It might be a good idea to save the log events with a Queue Worker. This way your server does not have to wait for
8086the save process to finish. You would have to configure the Laravel Queue settings and run the Queue listener.
8187https://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
8495Since this is a custom log channel for Laravel, all "standard" ways of generating log events etc should work with
8596the Laravel Log Facade. See https://laravel.com/docs/5.6/logging for more information.
0 commit comments