mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 08:55:24 +00:00
18 lines
437 B
Go
18 lines
437 B
Go
package server
|
|
|
|
import (
|
|
kitlog "github.com/go-kit/kit/log"
|
|
"github.com/kolide/kolide-ose/kolide"
|
|
)
|
|
|
|
// logging middleware logs the service actions
|
|
type loggingMiddleware struct {
|
|
kolide.Service
|
|
logger kitlog.Logger
|
|
}
|
|
|
|
// NewLoggingService takes an existing service and adds a logging wrapper
|
|
func NewLoggingService(svc kolide.Service, logger kitlog.Logger) kolide.Service {
|
|
return loggingMiddleware{Service: svc, logger: logger}
|
|
}
|