mirror of
https://github.com/grafana/grafana.git
synced 2025-02-11 16:15:42 -06:00
* split out plugin manager * remove whitespace * fix tests * split up tests * updating naming conventions * simplify manager * tidy * explorations * fix build * tidy * fix tests * add logger helper * pass the tests * tidying * fix tests * tidy and re-add test * store depends on loader * enrich tests * fix test * undo gomod changes
58 lines
1.3 KiB
Go
58 lines
1.3 KiB
Go
package logger
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/grafana/grafana/pkg/infra/log"
|
|
)
|
|
|
|
type InfraLogWrapper struct {
|
|
log log.Logger
|
|
}
|
|
|
|
func NewLogger(name string) *InfraLogWrapper {
|
|
return &InfraLogWrapper{
|
|
log: log.New(name),
|
|
}
|
|
}
|
|
|
|
func (l *InfraLogWrapper) Successf(format string, args ...interface{}) {
|
|
l.log.Info(fmt.Sprintf(format, args...))
|
|
}
|
|
|
|
func (l *InfraLogWrapper) Failuref(format string, args ...interface{}) {
|
|
l.log.Error(fmt.Sprintf(format, args...))
|
|
}
|
|
|
|
func (l *InfraLogWrapper) Info(args ...interface{}) {
|
|
l.log.Info(fmt.Sprint(args...))
|
|
}
|
|
|
|
func (l *InfraLogWrapper) Infof(format string, args ...interface{}) {
|
|
l.log.Info(fmt.Sprintf(format, args...))
|
|
}
|
|
|
|
func (l *InfraLogWrapper) Debug(args ...interface{}) {
|
|
l.log.Debug(fmt.Sprint(args...))
|
|
}
|
|
|
|
func (l *InfraLogWrapper) Debugf(format string, args ...interface{}) {
|
|
l.log.Debug(fmt.Sprintf(format, args...))
|
|
}
|
|
|
|
func (l *InfraLogWrapper) Warn(args ...interface{}) {
|
|
l.log.Warn(fmt.Sprint(args...))
|
|
}
|
|
|
|
func (l *InfraLogWrapper) Warnf(format string, args ...interface{}) {
|
|
l.log.Warn(fmt.Sprintf(format, args...))
|
|
}
|
|
|
|
func (l *InfraLogWrapper) Error(args ...interface{}) {
|
|
l.log.Error(fmt.Sprint(args...))
|
|
}
|
|
|
|
func (l *InfraLogWrapper) Errorf(format string, args ...interface{}) {
|
|
l.log.Error(fmt.Sprintf(format, args...))
|
|
}
|