Documentation
¶
Index ¶
- Variables
- func SetLevel(l Level)
- type Composer
- type Field
- func Binary(k string, b []byte) Field
- func Bool(k string, b bool) Field
- func Float32(k string, f float32) Field
- func Float64(k string, f float64) Field
- func Int(k string, i int) Field
- func Int16(k string, i int16) Field
- func Int32(k string, i int32) Field
- func Int64(k string, i int64) Field
- func Int8(k string, i int8) Field
- func String(k string, s string) Field
- func Tag(s string) Field
- func Uint(k string, i uint) Field
- func Uint16(k string, i uint16) Field
- func Uint32(k string, i uint32) Field
- func Uint64(k string, i uint64) Field
- func Uint8(k string, i uint8) Field
- type FieldType
- type Level
- type Logger
- type Record
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultLogger = NewLogger()
DefaultLogger initializes default logger
Functions ¶
Types ¶
type Composer ¶
type Composer interface { Write(string) Bold(string) string Underline(string) string Blink(string) string Grey(string) string Red(string) string Green(string) string Yellow(string) string Blue(string) string LightGrey(string) string String() string }
Composer encapsulates a text writer
type Field ¶
type Field struct { Key string `json:"key"` Type FieldType `json:"type,omitempty"` Binary []byte `json:"binary,omitempty"` Integer int64 `json:"integer,omitempty"` Float float64 `json:"float,omitempty"` String string `json:"string,omitempty"` Bool bool `json:"bool,omitempty"` }
Field encapsulates logging fields
type Level ¶
type Level int
Level defines the importance and urgency of the log message
Defines the importance level of logs
func LevelFromString ¶
LevelFromString returns the log level enum from a string
Click to show internal directories.
Click to hide internal directories.