Documentation ¶
Overview ¶
Package logger defines how to log in trails as well as provide a default implementation of that interface.
Index ¶
- type Logger
- type TrailsLogger
- func (l *TrailsLogger) Debug(msg string, data map[string]interface{})
- func (l *TrailsLogger) Error(msg string, data map[string]interface{})
- func (l *TrailsLogger) Fatal(msg string, data map[string]interface{})
- func (l *TrailsLogger) Info(msg string, data map[string]interface{})
- func (l *TrailsLogger) Warn(msg string, data map[string]interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface { Debug(msg string, data map[string]interface{}) Error(msg string, data map[string]interface{}) Fatal(msg string, data map[string]interface{}) Info(msg string, data map[string]interface{}) Warn(msg string, data map[string]interface{}) }
The Logger interface defines the levels a logging can occur at.
type TrailsLogger ¶
type TrailsLogger struct {
// contains filtered or unexported fields
}
TrailsLogger implements Logger using log.
func (*TrailsLogger) Debug ¶
func (l *TrailsLogger) Debug(msg string, data map[string]interface{})
Debug writes a debug log.
func (*TrailsLogger) Error ¶
func (l *TrailsLogger) Error(msg string, data map[string]interface{})
Debug writes an error log.
func (*TrailsLogger) Fatal ¶
func (l *TrailsLogger) Fatal(msg string, data map[string]interface{})
Debug writes a fatal log.
func (*TrailsLogger) Info ¶
func (l *TrailsLogger) Info(msg string, data map[string]interface{})
Info writes an info log.
func (*TrailsLogger) Warn ¶
func (l *TrailsLogger) Warn(msg string, data map[string]interface{})
Warn writes a warning log.
Click to show internal directories.
Click to hide internal directories.