@@ -31,7 +31,7 @@ You will need to add an array under 'channels' for Log-to-DB here like so:
31
31
'connection' => 'default',
32
32
'collection' => 'log',
33
33
'detailed' => true,
34
- 'queue' => ''
34
+ 'queue' => false
35
35
'queue_name' => ''
36
36
'queue_connection' => ''
37
37
]
@@ -51,7 +51,7 @@ This could be copied to your project if you would like edit it with the vendor p
51
51
```
52
52
php artisan vendor:publish
53
53
```
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:
55
55
```
56
56
LOG_DB_CONNECTION='default'
57
57
LOG_DB_DETAILED=false
@@ -75,11 +75,22 @@ Log::channel('mongodb')->info("This thing just happened");
75
75
This logger works the same as any other across Laravel, for example you can add it to a stack.
76
76
You can log multiple levels to multiple DB connections... the possibilities are ENDLESS! 😎
77
77
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
79
85
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
80
86
the save process to finish. You would have to configure the Laravel Queue settings and run the Queue listener.
81
87
https://laravel.com/docs/5.6/queues#running-the-queue-worker
82
88
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
+
83
94
## Usage
84
95
Since this is a custom log channel for Laravel, all "standard" ways of generating log events etc should work with
85
96
the Laravel Log Facade. See https://laravel.com/docs/5.6/logging for more information.
0 commit comments