[chore] Silence maxprocs logging (#1402)

This switches the logger to Debug. By default the library logs things
internally despite returning errors. Due to the way we had it hooked up
this resulted in scary error level logs being emitted for innocuous
errors. Now those errors will only be visible in debug mode.

Fixes: #1398
Relates to: #1336
This commit is contained in:
Daniele Sluijters 2023-01-31 09:39:46 +01:00 committed by GitHub
parent dc766f9e6f
commit eccb3800d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ import (
// Start creates and starts a gotosocial server // Start creates and starts a gotosocial server
var Start action.GTSAction = func(ctx context.Context) error { var Start action.GTSAction = func(ctx context.Context) error {
_, err := maxprocs.Set(maxprocs.Logger(log.Errorf)) _, err := maxprocs.Set(maxprocs.Logger(log.Debugf))
if err != nil { if err != nil {
return fmt.Errorf("failed to set CPU limits from cgroup: %s", err) return fmt.Errorf("failed to set CPU limits from cgroup: %s", err)
} }