Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { // Level of logging (panic, fatal, error, warn, info, default: debug) Level string // Output (default: os.Stdout) Output io.Writer }
Configuration contains all configurations for logger
func (*Configuration) Validate ¶
func (c *Configuration) Validate() error
Validate validates if the configuration is valid
type Logger ¶
type Logger interface { Debug(args ...interface{}) DebugWithFields(fields map[string]interface{}, args ...interface{}) Info(args ...interface{}) InfoWithFields(fields map[string]interface{}, args ...interface{}) Warn(args ...interface{}) WarnWithFields(fields map[string]interface{}, args ...interface{}) Error(args ...interface{}) ErrorWithFields(fields map[string]interface{}, args ...interface{}) Fatal(args ...interface{}) FatalWithFields(fields map[string]interface{}, args ...interface{}) Panic(args ...interface{}) PanicWithFields(fields map[string]interface{}, args ...interface{}) }
Logger interface for logging messages
func NewLogger ¶
func NewLogger(config Configuration) (Logger, error)
NewLogger creates a new logger
Click to show internal directories.
Click to hide internal directories.