Skip to content

Commit 32fa907

Browse files
committed
Docs pruning command.
1 parent c156859 commit 32fa907

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Lightweight package to log slack exceptions.
22

3+
34
<p align="center">
45
<img src="https://raw.githubusercontent.com/BinarCode/laravel-developer/master/static/Laravel_Developer.png">
56
</p>
@@ -159,6 +160,21 @@ LaravelDeveloper::notifyUsing(function (DevNotification $argument) {
159160
```
160161

161162

163+
### Log pruning
164+
165+
Without pruning, the `exception_logs` table can accumulate records very quickly. To mitigate this, you should schedule the `dev:prune` Artisan command to run daily:
166+
167+
```shell script
168+
$schedule->command('dev:prune')->daily();
169+
```
170+
171+
By default, all entries older than 24 hours will be pruned. You may use the hours option when calling the command to determine how long to retain Developer data. For example, the following command will delete all records created over 48 hours ago:
172+
173+
174+
```shell script
175+
$schedule->command('dev:prune --hours=48')->daily();
176+
```
177+
162178
## Testing
163179

164180
``` bash

0 commit comments

Comments
 (0)