fleet/server/service/logging_fim.go
Charlie Gildawie df93abd722
Reduce verbosity of default logging (#2225)
* Moves much logging from the info level to the debug level
* Tries to retain security/auditing relevant logs at info level
2020-04-22 14:01:34 -07:00

33 lines
685 B
Go

package service
import (
"context"
"time"
"github.com/kolide/fleet/server/kolide"
)
func (mw loggingMiddleware) GetFIM(ctx context.Context) (cfg *kolide.FIMConfig, err error) {
defer func(begin time.Time) {
_ = mw.loggerDebug(err).Log(
"method", "GetFIM",
"err", err,
"took", time.Since(begin),
)
}(time.Now())
cfg, err = mw.Service.GetFIM(ctx)
return cfg, err
}
func (mw loggingMiddleware) ModifyFIM(ctx context.Context, fim kolide.FIMConfig) (err error) {
defer func(begin time.Time) {
_ = mw.loggerInfo(err).Log(
"method", "ModifyFIM",
"err", err,
"took", time.Since(begin),
)
}(time.Now())
err = mw.Service.ModifyFIM(ctx, fim)
return err
}