set the memlimit default loglevel to error

This commit is contained in:
Roman Perekhod
2024-10-29 12:32:04 +01:00
parent 6f27b4d53d
commit b4f330278e
2 changed files with 17 additions and 2 deletions
+11 -2
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()),
)
}