File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -50,19 +50,36 @@ composer require jenssegers/mongodb
50
50
## Configuration
51
51
Starting with Laravel 5.6 and later, you will have a new config file: "config/logging.php".
52
52
You will need to add an array under 'channels' for Log-to-DB here like so:
53
+ ``` php
54
+ 'database' => [
55
+ 'driver' => 'custom',
56
+ 'via' => danielme85\LaravelLogToDB\LogToDbHandler::class
57
+ ...
58
+ ],
59
+ ```
60
+ These are the minimum required logging.php config settings to get started. Please note that the array index 'database'
61
+ can be whatever string you like as long as it is unique to this logging config.
62
+ You can also give the logging channel a name that later is referenced in a column in the DB table, this way you can have multiple
63
+ logging-to-db channels.
64
+
53
65
``` php
54
66
'channels' => [
55
67
'stack' => [
56
68
'name' => 'Log Stack',
57
69
'driver' => 'stack',
58
- 'channels' => ['database', 'file'],
70
+ 'channels' => ['database', 'other-database', ' file'],
59
71
],
60
72
'database' => [
73
+ 'driver' => 'custom',
74
+ 'via' => danielme85\LaravelLogToDB\LogToDbHandler::class,
75
+ 'name' => 'Basic DB Logging'
76
+ ],
77
+ 'other-database' => [
61
78
'driver' => 'custom',
62
79
'via' => danielme85\LaravelLogToDB\LogToDbHandler::class,
63
80
//'model' => App\Model\Log::class, //Your own optional custom model
64
81
'level' => env('APP_LOG_LEVEL', 'debug'),
65
- 'name' => 'My DB Log',
82
+ 'name' => 'My DB Log with a bunch more settings ',
66
83
'connection' => 'default',
67
84
'collection' => 'log',
68
85
'detailed' => true,
You can’t perform that action at this time.
0 commit comments