Merge pull request #10433 from 2403905/issue-10427

set the memlimit default loglevel to error
This commit is contained in:
Roman Perekhod
2024-10-29 15:02:12 +01:00
committed by GitHub
2 changed files with 17 additions and 2 deletions

View File

@@ -0,0 +1,6 @@
Bugfix: Fix the memlimit loglevel
We set the memlimit default loglevel to error.
https://github.com/owncloud/ocis/pull/10431
https://github.com/owncloud/ocis/issues/10428

View File

@@ -1,6 +1,15 @@
package shared
import (
// we import automemlimit here to include it for ocis als well as individual service binaries
_ "github.com/KimMachineGun/automemlimit"
"log/slog"
"github.com/KimMachineGun/automemlimit/memlimit"
)
// we init the memlimit here to include it for ocis als well as individual service binaries
func init() {
slog.SetLogLoggerLevel(slog.LevelError)
_, _ = memlimit.SetGoMemLimitWithOpts(
memlimit.WithLogger(slog.Default()),
)
}