config.go 385 B

123456789101112131415161718192021222324
  1. package config
  2. import (
  3. kitlog "github.com/go-kit/kit/log"
  4. "log"
  5. "os"
  6. )
  7. var Logger *log.Logger
  8. var KitLogger kitlog.Logger
  9. func init() {
  10. Logger = log.New(os.Stderr, "", log.LstdFlags)
  11. KitLogger = kitlog.NewLogfmtLogger(os.Stderr)
  12. KitLogger = kitlog.With(KitLogger, "ts", kitlog.DefaultTimestampUTC)
  13. KitLogger = kitlog.With(KitLogger, "caller", kitlog.DefaultCaller)
  14. }