mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-16 11:08:14 +02:00
skip log writes if max retention setting is zero
This commit is contained in:
1 parent
b29e404f22
commit
97345f0317
2 files changed
+20
-4
No files matched your search
+3
-2
@@ -1186,10 +1186,11 @@ func (app *BaseApp) initLogger() error {
|
||||
BatchSize: 200,
|
||||
BeforeAddFunc: func(ctx context.Context, log *logger.Log) bool {
|
||||
ticker.Reset(duration)
|
||||
return true
|
||||
|
||||
return app.Settings().Logs.MaxDays > 0
|
||||
},
|
||||
WriteFunc: func(ctx context.Context, logs []*logger.Log) error {
|
||||
if !app.IsBootstrapped() {
|
||||
if !app.IsBootstrapped() || app.Settings().Logs.MaxDays == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user