Documentation ¶
Index ¶
- Constants
- func Close()
- func Debugf(format string, args ...interface{})
- func Errorf(format string, args ...interface{})
- func Fatalf(format string, args ...interface{})
- func GetLevel() uint32
- func Infof(format string, args ...interface{})
- func SetFormatter(f Formatter)
- func SetLevel(v uint32)
- func SetOutput(out io.Writer)
- func Warnf(format string, args ...interface{})
- type Fields
- type FormatJSON
- type FormatString
- type Formatter
- type Logger
- type Message
- type Sender
- type Writer
- type WriterContext
Constants ¶
View Source
const ( LevelError uint32 LevelWarn LevelInfo LevelDebug )
Variables ¶
This section is empty.
Functions ¶
func SetFormatter ¶ added in v0.1.4
func SetFormatter(f Formatter)
Types ¶
type FormatJSON ¶ added in v0.1.4
type FormatJSON struct{}
func NewFormatJSON ¶ added in v0.1.4
func NewFormatJSON() *FormatJSON
type FormatString ¶ added in v0.1.4
type FormatString struct {
// contains filtered or unexported fields
}
func NewFormatString ¶ added in v0.1.4
func NewFormatString() *FormatString
func (*FormatString) Encode ¶ added in v0.1.4
func (v *FormatString) Encode(m *Message) ([]byte, error)
func (*FormatString) SetDelimiter ¶ added in v0.1.4
func (v *FormatString) SetDelimiter(d string)
type Logger ¶
type Logger interface { SetOutput(out io.Writer) SetFormatter(f Formatter) SetLevel(v uint32) GetLevel() uint32 Close() WriterContext }
Logger base interface
type Message ¶ added in v0.1.4
type Message struct { UnixTime int64 `json:"time" yaml:"time"` Level string `json:"lvl" yaml:"lvl"` Message string `json:"msg" yaml:"msg"` Ctx map[string]interface{} `json:"ctx,omitempty" yaml:"ctx,omitempty,inline"` }
func (Message) MarshalEasyJSON ¶ added in v0.1.4
MarshalEasyJSON supports easyjson.Marshaler interface
func (Message) MarshalJSON ¶ added in v0.1.4
MarshalJSON supports json.Marshaler interface
func (*Message) UnmarshalEasyJSON ¶ added in v0.1.4
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Message) UnmarshalJSON ¶ added in v0.1.4
UnmarshalJSON supports json.Unmarshaler interface
type Writer ¶
type Writer interface { Fatalf(format string, args ...interface{}) Errorf(format string, args ...interface{}) Warnf(format string, args ...interface{}) Infof(format string, args ...interface{}) Debugf(format string, args ...interface{}) }
Writer interface
Click to show internal directories.
Click to hide internal directories.