mirror of
https://github.com/containous/traefik.git
synced 2025-01-05 09:17:52 +03:00
20 lines
463 B
Go
20 lines
463 B
Go
package logs
|
|
|
|
import "github.com/rs/zerolog"
|
|
|
|
type ElasticLogger struct {
|
|
logger zerolog.Logger
|
|
}
|
|
|
|
func NewElasticLogger(logger zerolog.Logger) *ElasticLogger {
|
|
return &ElasticLogger{logger: logger}
|
|
}
|
|
|
|
func (l ElasticLogger) Debugf(format string, args ...interface{}) {
|
|
l.logger.Debug().CallerSkipFrame(1).Msgf(format, args...)
|
|
}
|
|
|
|
func (l ElasticLogger) Errorf(format string, args ...interface{}) {
|
|
l.logger.Error().CallerSkipFrame(1).Msgf(format, args...)
|
|
}
|