You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will copy the templates to `resources/views/vendor/github-monolog/` where you can modify them:
116
+
117
+
-`issue.md`: Template for new issues
118
+
-`comment.md`: Template for comments on existing issues
119
+
-`previous_exception.md`: Template for previous exceptions in the chain
120
+
121
+
Available template variables:
122
+
-`{level}`: Log level (error, warning, etc.)
123
+
-`{message}`: The error message or log content
124
+
-`{simplified_stack_trace}`: A cleaned up stack trace
125
+
-`{full_stack_trace}`: The complete stack trace
126
+
-`{previous_exceptions}`: Details of any previous exceptions
127
+
-`{context}`: Additional context data
128
+
-`{extra}`: Extra log data
129
+
-`{signature}`: Internal signature used for deduplication
107
130
108
131
### Deduplication
109
132
110
-
Group similar errors to avoid duplicate issues. By default, the package uses file-based storage. Customize the storage and time window to fit your application.
133
+
Group similar errors to avoid duplicate issues. The package uses Laravel's cache system for deduplication storage.
111
134
112
135
```php
113
136
'github' => [
114
137
// ... basic config from above ...
115
138
'deduplication' => [
116
-
'store' => 'file', // Default store
117
-
'time' => 60, // Time window in seconds
139
+
'time' => 60, // Time window in seconds - how long to wait before creating a new issue
140
+
'store' => null, // Uses your default cache store (from cache.default)
141
+
'prefix' => 'dedup', // Prefix for cache keys
118
142
],
119
143
]
120
144
```
121
145
122
-
#### Alternative Storage Options
123
-
124
-
Consider other storage options in these Laravel-specific scenarios:
125
-
126
-
-**Redis Store**: Use when:
127
-
- Running async queue jobs (file storage won't work across processes)
128
-
- Using Laravel Horizon for queue management
129
-
- Running multiple application instances behind a load balancer
130
-
131
-
```php
132
-
'deduplication' => [
133
-
'store' => 'redis',
134
-
'prefix' => 'github-monolog:',
135
-
'connection' => 'default', // Uses your Laravel Redis connection
136
-
],
137
-
```
138
-
139
-
-**Database Store**: Use when:
140
-
- Running queue jobs but Redis isn't available
141
-
- Need to persist deduplication data across deployments
142
-
- Want to query/debug deduplication history via database
143
-
144
-
```php
145
-
'deduplication' => [
146
-
'store' => 'database',
147
-
'table' => 'github_monolog_deduplication',
148
-
'connection' => null, // Uses your default database connection
149
-
],
150
-
```
146
+
For cache store configuration, refer to the [Laravel Cache documentation](https://laravel.com/docs/cache).
'store' => null, // (optional) Uses Laravel's default cache store
51
+
'time' => 60, // Time window in seconds
52
+
'prefix' => 'dedup', // Cache key prefix
53
+
],
54
+
```
55
+
56
+
### Cleanup Code
57
+
58
+
Before updating your configuration to the new format, you should clean up artifacts from the 2.x version. The cleanup code uses your existing configuration to find and remove old storage:
59
+
60
+
```php
61
+
use Illuminate\Support\Facades\{Schema, Redis, File, DB};
0 commit comments