-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10433 from 2403905/issue-10427
set the memlimit default loglevel to error
- Loading branch information
Showing
2 changed files
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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()), | ||
) | ||
} |