func (l *Logger) Debugf(format string, args ...interface{}) {
	log.Printf("D! ["+l.Name+"] "+format, args...)
}
Debugf logs a debug message, patterned after log.Printf.
package models
import (
	"log"
	"reflect"
	"github.com/influxdata/telegraf"
)
type Logger struct {
	OnErrs []func()
	Name   string  
}
func NewLogger(pluginType, name, alias string) *Logger {
	return &Logger{
		Name: logName(pluginType, name, alias),
	}
}
func (l *Logger) OnErr(f func()) {
	l.OnErrs = append(l.OnErrs, f)
}
func (l *Logger) Errorf(format string, args ...interface{}) {
	for _, f := range l.OnErrs {
		f()
	}
	log.Printf("E! ["+l.Name+"] "+format, args...)
}
func (l *Logger) Error(args ...interface{}) {
	for _, f := range l.OnErrs {
		f()
	}
	log.Print(append([]interface{}{"E! [" + l.Name + "] "}, args...)...)
}