2024-07-29 16:42:40 +08:00
|
|
|
package mqtt_consumer
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/influxdata/telegraf"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type mqttLogger struct {
|
|
|
|
|
telegraf.Logger
|
|
|
|
|
}
|
|
|
|
|
|
2024-11-18 19:27:17 +08:00
|
|
|
// Printf implements mqtt.Logger
|
2024-07-29 16:42:40 +08:00
|
|
|
func (l mqttLogger) Printf(fmt string, args ...interface{}) {
|
|
|
|
|
l.Logger.Debugf(fmt, args...)
|
|
|
|
|
}
|
2024-11-18 19:27:17 +08:00
|
|
|
|
|
|
|
|
// Println implements mqtt.Logger
|
2024-07-29 16:42:40 +08:00
|
|
|
func (l mqttLogger) Println(args ...interface{}) {
|
|
|
|
|
l.Logger.Debug(args...)
|
|
|
|
|
}
|