Documentation ¶
Index ¶
- func NewPrettyLogger(name string) *prettyLogger
- type Logger
- type Logs
- type PrettyLogger
- type TestLogger
- func (f *TestLogger) Debug(msg string, ctx ...any)
- func (f *TestLogger) Error(msg string, ctx ...any)
- func (f *TestLogger) FromContext(_ context.Context) Logger
- func (f *TestLogger) Info(msg string, ctx ...any)
- func (f *TestLogger) New(_ ...any) Logger
- func (f *TestLogger) Warn(msg string, ctx ...any)
- type TestPrettyLogger
- func (f *TestPrettyLogger) Debug(_ ...any)
- func (f *TestPrettyLogger) Debugf(_ string, _ ...any)
- func (f *TestPrettyLogger) Error(_ ...any)
- func (f *TestPrettyLogger) Errorf(_ string, _ ...any)
- func (f *TestPrettyLogger) Failuref(_ string, _ ...any)
- func (f *TestPrettyLogger) Info(_ ...any)
- func (f *TestPrettyLogger) Infof(_ string, _ ...any)
- func (f *TestPrettyLogger) Successf(_ string, _ ...any)
- func (f *TestPrettyLogger) Warn(_ ...any)
- func (f *TestPrettyLogger) Warnf(_ string, _ ...any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPrettyLogger ¶
func NewPrettyLogger(name string) *prettyLogger
Types ¶
type Logger ¶
type Logger interface { // New returns a new contextual Logger that has this logger's context plus the given context. New(ctx ...any) Logger // Debug logs a message with debug level and key/value pairs, if any. Debug(msg string, ctx ...any) // Info logs a message with info level and key/value pairs, if any. Info(msg string, ctx ...any) // Warn logs a message with warning level and key/value pairs, if any. Warn(msg string, ctx ...any) // Error logs a message with error level and key/value pairs, if any. Error(msg string, ctx ...any) // FromContext returns a new contextual Logger that has this logger's context plus the given context. FromContext(ctx context.Context) Logger }
Logger is the default logger
type PrettyLogger ¶
type PrettyLogger interface { Successf(format string, args ...any) Failuref(format string, args ...any) Info(args ...any) Infof(format string, args ...any) Debug(args ...any) Debugf(format string, args ...any) Warn(args ...any) Warnf(format string, args ...any) Error(args ...any) Errorf(format string, args ...any) }
PrettyLogger is used primarily to facilitate logging/user feedback for both the grafana-cli and the grafana backend when managing plugin installs
type TestLogger ¶
func NewTestLogger ¶
func NewTestLogger() *TestLogger
func (*TestLogger) Debug ¶
func (f *TestLogger) Debug(msg string, ctx ...any)
func (*TestLogger) Error ¶
func (f *TestLogger) Error(msg string, ctx ...any)
func (*TestLogger) FromContext ¶
func (f *TestLogger) FromContext(_ context.Context) Logger
func (*TestLogger) Info ¶
func (f *TestLogger) Info(msg string, ctx ...any)
func (*TestLogger) New ¶
func (f *TestLogger) New(_ ...any) Logger
func (*TestLogger) Warn ¶
func (f *TestLogger) Warn(msg string, ctx ...any)
type TestPrettyLogger ¶
type TestPrettyLogger struct{}
func NewTestPrettyLogger ¶
func NewTestPrettyLogger() *TestPrettyLogger
func (*TestPrettyLogger) Debug ¶
func (f *TestPrettyLogger) Debug(_ ...any)
func (*TestPrettyLogger) Debugf ¶
func (f *TestPrettyLogger) Debugf(_ string, _ ...any)
func (*TestPrettyLogger) Error ¶
func (f *TestPrettyLogger) Error(_ ...any)
func (*TestPrettyLogger) Errorf ¶
func (f *TestPrettyLogger) Errorf(_ string, _ ...any)
func (*TestPrettyLogger) Failuref ¶
func (f *TestPrettyLogger) Failuref(_ string, _ ...any)
func (*TestPrettyLogger) Info ¶
func (f *TestPrettyLogger) Info(_ ...any)
func (*TestPrettyLogger) Infof ¶
func (f *TestPrettyLogger) Infof(_ string, _ ...any)
func (*TestPrettyLogger) Successf ¶
func (f *TestPrettyLogger) Successf(_ string, _ ...any)
func (*TestPrettyLogger) Warn ¶
func (f *TestPrettyLogger) Warn(_ ...any)
func (*TestPrettyLogger) Warnf ¶
func (f *TestPrettyLogger) Warnf(_ string, _ ...any)
Click to show internal directories.
Click to hide internal directories.