logger.go 544 B

1234567891011121314151617181920212223
  1. // Copyright The OpenTelemetry Authors
  2. // SPDX-License-Identifier: Apache-2.0
  3. package influxdbreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/influxdbreceiver"
  4. import (
  5. "github.com/influxdata/influxdb-observability/common"
  6. "go.uber.org/zap"
  7. )
  8. type zapInfluxLogger struct {
  9. *zap.SugaredLogger
  10. }
  11. func newZapInfluxLogger(logger *zap.Logger) common.Logger {
  12. return &zapInfluxLogger{
  13. logger.Sugar(),
  14. }
  15. }
  16. func (l zapInfluxLogger) Debug(msg string, kv ...any) {
  17. l.SugaredLogger.Debugw(msg, kv...)
  18. }