set the memlimit default loglevel to error

This commit is contained in:
Roman Perekhod
2024-10-28 22:31:14 +01:00
parent 6f27b4d53d
commit b4f330278e
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()),
)
}