Skip to content

Commit 3ef6dff

Browse files
committed
Merge branch 'master' of github.com:adamcrampton/laravel-database-logger
2 parents 80fa57e + f39f68e commit 3ef6dff

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,18 @@ Laravel logs to database table via custom Monolog channel + Eloquent model.
1414
]
1515
]
1616
```
17-
* Add a setting to your .env file for the new channel name: ```LOG_CHANNEL=database```
17+
* Update the log stack array in ```config\logging.php``` to include the new channel:
1818

19+
```
20+
'stack' => [
21+
'driver' => 'stack',
22+
'channels' => ['daily', 'database'],
23+
],
24+
'database' => [
25+
'driver' => 'custom',
26+
'via' => \AdamCrampton\LaravelDatabaseLogger\Services\LogMonoLog::class
27+
],
28+
```
1929
## Usage
2030
The package is pretty much a custom channel for Monolog, so you can use the existing facade and methods.
2131

@@ -28,4 +38,4 @@ These columns are automatically populated when adding to the log:
2838

2939
Additionally, you can pass in a ```category``` and ```sub_category``` value, which will be saved to those columns when generating a log entry. Example:
3040

31-
```Log::info('test', ['category' => 'This is a category', 'sub_category' => 'This is a subcategory]);```
41+
```Log::info('test', ['category' => 'This is a category', 'sub_category' => 'This is a subcategory]);```

0 commit comments

Comments
 (0)