mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
df93abd722
* Moves much logging from the info level to the debug level * Tries to retain security/auditing relevant logs at info level
33 lines
685 B
Go
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
|
|
}
|