Documentation ¶
Overview ¶
It supports http, git and socket urls
Index ¶
- Constants
- func Close()
- func ColorString(level int, s string, isColorize bool) string
- func Debug(s string)
- func Debugf(s string, i ...interface{})
- func Debugln(i ...interface{})
- func Debugv(s string, v Vars)
- func Environment() string
- func Error(err error)
- func Errorf(e error, i ...interface{})
- func Errorln(i ...interface{})
- func Errorv(e error, v Vars)
- func Fatal(err error)
- func Fatalf(e error, i ...interface{})
- func Fatalln(i ...interface{})
- func Fatalv(e error, v Vars)
- func Format() int
- func FormatNames() []string
- func Formats() []int
- func Info(s string)
- func Infof(s string, i ...interface{})
- func Infoln(i ...interface{})
- func Infov(s string, v Vars)
- func IsFormat(f int) bool
- func IsFormatName(f string) bool
- func IsHTTP(s string) bool
- func IsLevel(l int) bool
- func IsLevelName(l string) bool
- func IsScheme(s string) bool
- func IsSocket(s string) bool
- func IsTimeStamp() bool
- func IsTimeStampLevel(l int) bool
- func IsTimeStampLevelName(l string) bool
- func IsTimeUTC() bool
- func LabelsSeparator() string
- func LabelsString() string
- func LabelsToSlice(l string) []string
- func LabelsToString(l []string) string
- func Level() int
- func LevelName() string
- func LevelNames() []string
- func Levels() []int
- func Panic(err error)
- func Panicf(e error, i ...interface{})
- func Panicln(i ...interface{})
- func Panicv(e error, v Vars)
- func Print(s string)
- func Printf(s string, i ...interface{})
- func Println(i ...interface{})
- func Printv(s string, v Vars)
- func SetEnvironment(s string)
- func SetFormat(f int) error
- func SetFormatName(f string) error
- func SetLabels(l string)
- func SetLabelsSeparator(s string)
- func SetLevel(l int) error
- func SetLevelName(l string) error
- func SetTag(t string)
- func SetTimeFormat(f string)
- func SetTimeStamp(t bool)
- func SetTimeStampLevel(l int) error
- func SetTimeStampLevelName(l string) error
- func SetTimeUTC(u bool)
- func SocketAddress(c *Connection, udpPort int, tcpPort int) error
- func SocketAddressBuild(c *Connection) string
- func SocketConnection(c *Connection, udpPort int, tcpPort int) error
- func SocketScheme(c *Connection) error
- func SocketURL(c *Connection, udpPort int, tcpPort int) error
- func SocketURLBuild(c *Connection) string
- func StrBool(v bool) string
- func StrFloat32(v float32) string
- func StrFloat64(v float64) string
- func StrInt(v int) string
- func StrInt16(v int16) string
- func StrInt32(v int32) string
- func StrInt64(v int64) string
- func StrInt8(v int8) string
- func StrUInt(v uint) string
- func StrUInt16(v uint16) string
- func StrUInt32(v uint32) string
- func StrUInt64(v uint64) string
- func StrUInt8(v uint8) string
- func StrV(v interface{}) string
- func StringColors() []string
- func TCPTLSCheck(t *TCPTLS) error
- func TCPTLSConfig(t *TCPTLS) (*tls.Config, error)
- func Tag() string
- func TimeFormat() string
- func TimeStampLevel() int
- func TimeStampLevelName() string
- func TimeStampLevelNames() []string
- func TimeStampLevels() []int
- func Trace(s string)
- func Tracef(s string, i ...interface{})
- func Traceln(i ...interface{})
- func Tracev(s string, v Vars)
- func Warn(s string)
- func Warnf(s string, i ...interface{})
- func Warnln(i ...interface{})
- func Warnv(s string, v Vars)
- type Connection
- type FMT
- func (f *FMT) Close() error
- func (f *FMT) Debug(m string)
- func (f *FMT) Debugf(m string, i ...interface{})
- func (f *FMT) Debugln(i ...interface{})
- func (f *FMT) Debugv(m string, v Vars)
- func (f *FMT) Environment() string
- func (f *FMT) Error(e error)
- func (f *FMT) Errorf(e error, i ...interface{})
- func (f *FMT) Errorln(i ...interface{})
- func (f *FMT) Errorv(e error, v Vars)
- func (f *FMT) Fatal(e error)
- func (f *FMT) Fatalf(e error, i ...interface{})
- func (f *FMT) Fatalln(i ...interface{})
- func (f *FMT) Fatalv(e error, v Vars)
- func (f *FMT) Format() int
- func (f *FMT) FormatName() string
- func (f *FMT) Info(m string)
- func (f *FMT) Infof(m string, i ...interface{})
- func (f *FMT) Infoln(i ...interface{})
- func (f *FMT) Infov(m string, v Vars)
- func (f *FMT) IsLevel(l int) bool
- func (f *FMT) IsLevelName(l string) bool
- func (f *FMT) IsTimeStamp() bool
- func (f *FMT) IsTimeStampLevel(l int) bool
- func (f *FMT) IsTimeStampLevelName(l string) bool
- func (f *FMT) IsTimeUTC() bool
- func (f *FMT) Labels() string
- func (f *FMT) LabelsSeparator() string
- func (f *FMT) LabelsToSlice(l string) []string
- func (f *FMT) LabelsToString(l []string) string
- func (f *FMT) Level() int
- func (f *FMT) LevelName() string
- func (f *FMT) LevelNames() []string
- func (f *FMT) Levels() []int
- func (f *FMT) Panic(e error)
- func (f *FMT) Panicf(e error, i ...interface{})
- func (f *FMT) Panicln(i ...interface{})
- func (f *FMT) Panicv(e error, v Vars)
- func (f *FMT) Print(m string)
- func (f *FMT) Printf(m string, i ...interface{})
- func (f *FMT) Println(i ...interface{})
- func (f *FMT) Printv(m string, v Vars)
- func (f *FMT) SetEnvironment(e string)
- func (f *FMT) SetLabels(l string)
- func (f *FMT) SetLabelsSeparator(spr string)
- func (f *FMT) SetLevel(l int) error
- func (f *FMT) SetLevelName(l string) error
- func (f *FMT) SetTag(t string)
- func (f *FMT) SetTimeFormat(s string)
- func (f *FMT) SetTimeStamp(t bool)
- func (f *FMT) SetTimeStampLevel(l int) error
- func (f *FMT) SetTimeStampLevelName(l string) error
- func (f *FMT) SetTimeUTC(u bool)
- func (f *FMT) Tag() string
- func (f *FMT) TimeFormat() string
- func (f *FMT) TimeStampLevel() int
- func (f *FMT) TimeStampLevelName() string
- func (f *FMT) TimeStampLevelNames() []string
- func (f *FMT) TimeStampLevels() []int
- func (f *FMT) Trace(m string)
- func (f *FMT) Tracef(m string, i ...interface{})
- func (f *FMT) Traceln(i ...interface{})
- func (f *FMT) Tracev(m string, v Vars)
- func (f *FMT) Warn(s string)
- func (f *FMT) Warnf(m string, i ...interface{})
- func (f *FMT) Warnln(i ...interface{})
- func (f *FMT) Warnv(m string, v Vars)
- type FMTSettings
- type Fluent
- func (f *Fluent) Close() error
- func (f *Fluent) Debug(m string)
- func (f *Fluent) Debugf(m string, i ...interface{})
- func (f *Fluent) Debugln(i ...interface{})
- func (f *Fluent) Debugv(m string, v Vars)
- func (f *Fluent) Environment() string
- func (f *Fluent) Error(e error)
- func (f *Fluent) Errorf(e error, i ...interface{})
- func (f *Fluent) Errorln(i ...interface{})
- func (f *Fluent) Errorv(e error, v Vars)
- func (f *Fluent) Fatal(e error)
- func (f *Fluent) Fatalf(e error, i ...interface{})
- func (f *Fluent) Fatalln(i ...interface{})
- func (f *Fluent) Fatalv(e error, v Vars)
- func (f *Fluent) Format() int
- func (f *Fluent) FormatName() string
- func (f *Fluent) Info(m string)
- func (f *Fluent) Infof(m string, i ...interface{})
- func (f *Fluent) Infoln(i ...interface{})
- func (f *Fluent) Infov(m string, v Vars)
- func (f *Fluent) IsLevel(l int) bool
- func (f *Fluent) IsLevelName(l string) bool
- func (f *Fluent) IsTimeStamp() bool
- func (f *Fluent) IsTimeStampLevel(l int) bool
- func (f *Fluent) IsTimeStampLevelName(l string) bool
- func (f *Fluent) IsTimeUTC() bool
- func (f *Fluent) Labels() string
- func (f *Fluent) LabelsSeparator() string
- func (f *Fluent) LabelsToSlice(l string) []string
- func (f *Fluent) LabelsToString(l []string) string
- func (f *Fluent) Level() int
- func (f *Fluent) LevelName() string
- func (f *Fluent) LevelNames() []string
- func (f *Fluent) Levels() []int
- func (f *Fluent) Panic(e error)
- func (f *Fluent) Panicf(e error, i ...interface{})
- func (f *Fluent) Panicln(i ...interface{})
- func (f *Fluent) Panicv(e error, v Vars)
- func (f *Fluent) Print(m string)
- func (f *Fluent) Printf(m string, i ...interface{})
- func (f *Fluent) Println(i ...interface{})
- func (f *Fluent) Printv(m string, v Vars)
- func (f *Fluent) SetEnvironment(e string)
- func (f *Fluent) SetLabels(l string)
- func (f *Fluent) SetLabelsSeparator(spr string)
- func (f *Fluent) SetLevel(l int) error
- func (f *Fluent) SetLevelName(l string) error
- func (f *Fluent) SetTag(t string)
- func (f *Fluent) SetTimeFormat(s string)
- func (f *Fluent) SetTimeStamp(t bool)
- func (f *Fluent) SetTimeStampLevel(l int) error
- func (f *Fluent) SetTimeStampLevelName(l string) error
- func (f *Fluent) SetTimeUTC(u bool)
- func (f *Fluent) Tag() string
- func (f *Fluent) TimeFormat() string
- func (f *Fluent) TimeStampLevel() int
- func (f *Fluent) TimeStampLevelName() string
- func (f *Fluent) TimeStampLevelNames() []string
- func (f *Fluent) TimeStampLevels() []int
- func (f *Fluent) Trace(m string)
- func (f *Fluent) Tracef(m string, i ...interface{})
- func (f *Fluent) Traceln(i ...interface{})
- func (f *Fluent) Tracev(m string, v Vars)
- func (f *Fluent) Warn(s string)
- func (f *Fluent) Warnf(m string, i ...interface{})
- func (f *Fluent) Warnln(i ...interface{})
- func (f *Fluent) Warnv(m string, v Vars)
- type FluentSettings
- type Formatter
- type GELF
- func (g *GELF) Close() error
- func (g *GELF) Debug(s string)
- func (g *GELF) Debugf(s string, i ...interface{})
- func (g *GELF) Debugln(i ...interface{})
- func (g *GELF) Debugv(s string, v Vars)
- func (g *GELF) Environment() string
- func (g *GELF) Error(e error)
- func (g *GELF) Errorf(e error, i ...interface{})
- func (g *GELF) Errorln(i ...interface{})
- func (g *GELF) Errorv(e error, v Vars)
- func (g *GELF) Fatal(e error)
- func (g *GELF) Fatalf(e error, i ...interface{})
- func (g *GELF) Fatalln(i ...interface{})
- func (g *GELF) Fatalv(e error, v Vars)
- func (g *GELF) Format() int
- func (g *GELF) FormatName() string
- func (g *GELF) Info(s string)
- func (g *GELF) Infof(s string, i ...interface{})
- func (g *GELF) Infoln(i ...interface{})
- func (g *GELF) Infov(s string, v Vars)
- func (g *GELF) IsLevel(l int) bool
- func (g *GELF) IsLevelName(l string) bool
- func (g *GELF) IsTimeStamp() bool
- func (g *GELF) IsTimeStampLevel(l int) bool
- func (g *GELF) IsTimeStampLevelName(l string) bool
- func (g *GELF) IsTimeUTC() bool
- func (g *GELF) Labels() string
- func (g *GELF) LabelsSeparator() string
- func (g *GELF) LabelsToSlice(l string) []string
- func (g *GELF) LabelsToString(l []string) string
- func (g *GELF) Level() int
- func (g *GELF) LevelName() string
- func (g *GELF) LevelNames() []string
- func (g *GELF) Levels() []int
- func (g *GELF) Panic(e error)
- func (g *GELF) Panicf(e error, i ...interface{})
- func (g *GELF) Panicln(i ...interface{})
- func (g *GELF) Panicv(e error, v Vars)
- func (g *GELF) Print(s string)
- func (g *GELF) Printf(s string, i ...interface{})
- func (g *GELF) Println(i ...interface{})
- func (g *GELF) Printv(s string, v Vars)
- func (g *GELF) SetEnvironment(e string)
- func (g *GELF) SetLabels(l string)
- func (g *GELF) SetLabelsSeparator(s string)
- func (g *GELF) SetLevel(l int) error
- func (g *GELF) SetLevelName(l string) error
- func (g *GELF) SetTag(t string)
- func (g *GELF) SetTimeFormat(f string)
- func (g *GELF) SetTimeStamp(t bool)
- func (g *GELF) SetTimeStampLevel(l int) error
- func (g *GELF) SetTimeStampLevelName(l string) error
- func (g *GELF) SetTimeUTC(u bool)
- func (g *GELF) Tag() string
- func (g *GELF) TimeFormat() string
- func (g *GELF) TimeStampLevel() int
- func (g *GELF) TimeStampLevelName() string
- func (g *GELF) TimeStampLevelNames() []string
- func (g *GELF) TimeStampLevels() []int
- func (g *GELF) Trace(s string)
- func (g *GELF) Tracef(s string, i ...interface{})
- func (g *GELF) Traceln(i ...interface{})
- func (g *GELF) Tracev(s string, v Vars)
- func (g *GELF) Warn(s string)
- func (g *GELF) Warnf(s string, i ...interface{})
- func (g *GELF) Warnln(i ...interface{})
- func (g *GELF) Warnv(s string, v Vars)
- type GELFSettings
- type GELFTCP
- type GELFTCPReconnection
- type GELFUDP
- type GELFUDPCompression
- type JSON
- func (j *JSON) Close() error
- func (j *JSON) Debug(s string)
- func (j *JSON) Debugf(s string, i ...interface{})
- func (j *JSON) Debugln(i ...interface{})
- func (j *JSON) Debugv(s string, v Vars)
- func (j *JSON) Environment() string
- func (j *JSON) Error(e error)
- func (j *JSON) Errorf(e error, i ...interface{})
- func (j *JSON) Errorln(i ...interface{})
- func (j *JSON) Errorv(e error, v Vars)
- func (j *JSON) Fatal(e error)
- func (j *JSON) Fatalf(e error, i ...interface{})
- func (j *JSON) Fatalln(i ...interface{})
- func (j *JSON) Fatalv(e error, v Vars)
- func (j *JSON) Format() int
- func (j *JSON) FormatName() string
- func (j *JSON) Info(s string)
- func (j *JSON) Infof(s string, i ...interface{})
- func (j *JSON) Infoln(i ...interface{})
- func (j *JSON) Infov(s string, v Vars)
- func (j *JSON) IsLevel(l int) bool
- func (j *JSON) IsLevelName(l string) bool
- func (j *JSON) IsTimeStamp() bool
- func (j *JSON) IsTimeStampLevel(l int) bool
- func (j *JSON) IsTimeStampLevelName(l string) bool
- func (j *JSON) IsTimeUTC() bool
- func (j *JSON) Labels() string
- func (j *JSON) LabelsSeparator() string
- func (j *JSON) LabelsToSlice(l string) []string
- func (j *JSON) LabelsToString(l []string) string
- func (j *JSON) Level() int
- func (j *JSON) LevelName() string
- func (j *JSON) LevelNames() []string
- func (j *JSON) Levels() []int
- func (j *JSON) Panic(e error)
- func (j *JSON) Panicf(e error, i ...interface{})
- func (j *JSON) Panicln(i ...interface{})
- func (j *JSON) Panicv(e error, v Vars)
- func (j *JSON) Print(s string)
- func (j *JSON) Printf(s string, i ...interface{})
- func (j *JSON) Println(i ...interface{})
- func (j *JSON) Printv(s string, v Vars)
- func (j *JSON) SetEnvironment(e string)
- func (j *JSON) SetLabels(l string)
- func (j *JSON) SetLabelsSeparator(s string)
- func (j *JSON) SetLevel(l int) error
- func (j *JSON) SetLevelName(l string) error
- func (j *JSON) SetTag(t string)
- func (j *JSON) SetTimeFormat(f string)
- func (j *JSON) SetTimeStamp(t bool)
- func (j *JSON) SetTimeStampLevel(l int) error
- func (j *JSON) SetTimeStampLevelName(l string) error
- func (j *JSON) SetTimeUTC(u bool)
- func (j *JSON) Tag() string
- func (j *JSON) TimeFormat() string
- func (j *JSON) TimeStampLevel() int
- func (j *JSON) TimeStampLevelName() string
- func (j *JSON) TimeStampLevelNames() []string
- func (j *JSON) TimeStampLevels() []int
- func (j *JSON) Trace(s string)
- func (j *JSON) Tracef(s string, i ...interface{})
- func (j *JSON) Traceln(i ...interface{})
- func (j *JSON) Tracev(s string, v Vars)
- func (j *JSON) Warn(s string)
- func (j *JSON) Warnf(s string, i ...interface{})
- func (j *JSON) Warnln(i ...interface{})
- func (j *JSON) Warnv(s string, v Vars)
- type JSONKeys
- type JSONSettings
- type Keys
- type KeysNames
- type Labels
- type Logs
- func (ls *Logs) Close() error
- func (ls *Logs) Debug(s string)
- func (ls *Logs) Debugf(s string, i ...interface{})
- func (ls *Logs) Debugln(i ...interface{})
- func (ls *Logs) Debugv(s string, v Vars)
- func (ls *Logs) Environment() string
- func (ls *Logs) Error(e error)
- func (ls *Logs) Errorf(e error, i ...interface{})
- func (ls *Logs) Errorln(i ...interface{})
- func (ls *Logs) Errorv(e error, v Vars)
- func (ls *Logs) Fatal(e error)
- func (ls *Logs) Fatalf(e error, i ...interface{})
- func (ls *Logs) Fatalln(i ...interface{})
- func (ls *Logs) Fatalv(e error, v Vars)
- func (ls *Logs) Format() int
- func (ls *Logs) FormatName() string
- func (ls *Logs) FormatNames() []string
- func (ls *Logs) Formats() []int
- func (ls *Logs) Info(s string)
- func (ls *Logs) Infof(s string, i ...interface{})
- func (ls *Logs) Infoln(i ...interface{})
- func (ls *Logs) Infov(s string, v Vars)
- func (ls *Logs) IsFormat(f int) bool
- func (ls *Logs) IsFormatName(f string) bool
- func (ls *Logs) IsLevel(l int) bool
- func (ls *Logs) IsLevelName(l string) bool
- func (ls *Logs) IsTimeStamp() bool
- func (ls *Logs) IsTimeStampLevel(l int) bool
- func (ls *Logs) IsTimeStampLevelName(l string) bool
- func (ls *Logs) IsTimeUTC() bool
- func (ls *Logs) Labels() string
- func (ls *Logs) LabelsSeparator() string
- func (ls *Logs) LabelsToSlice(l string) []string
- func (ls *Logs) LabelsToString(l []string) string
- func (ls *Logs) Level() int
- func (ls *Logs) LevelName() string
- func (ls *Logs) LevelNames() []string
- func (ls *Logs) Levels() []int
- func (ls *Logs) Panic(e error)
- func (ls *Logs) Panicf(e error, i ...interface{})
- func (ls *Logs) Panicln(i ...interface{})
- func (ls *Logs) Panicv(e error, v Vars)
- func (ls *Logs) Print(s string)
- func (ls *Logs) Printf(s string, i ...interface{})
- func (ls *Logs) Println(i ...interface{})
- func (ls *Logs) Printv(s string, v Vars)
- func (ls *Logs) SetEnvironment(s string)
- func (ls *Logs) SetFormat(f int) error
- func (ls *Logs) SetFormatName(f string) error
- func (ls *Logs) SetLabels(l string)
- func (ls *Logs) SetLabelsSeparator(l string)
- func (ls *Logs) SetLevel(l int) error
- func (ls *Logs) SetLevelName(l string) error
- func (ls *Logs) SetTag(t string)
- func (ls *Logs) SetTimeFormat(f string)
- func (ls *Logs) SetTimeStamp(t bool)
- func (ls *Logs) SetTimeStampLevel(l int) error
- func (ls *Logs) SetTimeStampLevelName(l string) error
- func (ls *Logs) SetTimeUTC(u bool)
- func (ls *Logs) Tag() string
- func (ls *Logs) TimeFormat() string
- func (ls *Logs) TimeStampLevel() int
- func (ls *Logs) TimeStampLevelName() string
- func (ls *Logs) TimeStampLevelNames() []string
- func (ls *Logs) TimeStampLevels() []int
- func (ls *Logs) Trace(s string)
- func (ls *Logs) Tracef(s string, i ...interface{})
- func (ls *Logs) Traceln(i ...interface{})
- func (ls *Logs) Tracev(s string, v Vars)
- func (ls *Logs) Warn(s string)
- func (ls *Logs) Warnf(s string, i ...interface{})
- func (ls *Logs) Warnln(i ...interface{})
- func (ls *Logs) Warnv(s string, v Vars)
- type StdOE
- type Sys
- func (s *Sys) Close() error
- func (s *Sys) Debug(m string)
- func (s *Sys) Debugf(m string, i ...interface{})
- func (s *Sys) Debugln(i ...interface{})
- func (s *Sys) Debugv(m string, v Vars)
- func (s *Sys) Environment() string
- func (s *Sys) Error(e error)
- func (s *Sys) Errorf(e error, i ...interface{})
- func (s *Sys) Errorln(i ...interface{})
- func (s *Sys) Errorv(e error, v Vars)
- func (s *Sys) Fatal(e error)
- func (s *Sys) Fatalf(e error, i ...interface{})
- func (s *Sys) Fatalln(i ...interface{})
- func (s *Sys) Fatalv(e error, v Vars)
- func (s *Sys) Format() int
- func (s *Sys) FormatName() string
- func (s *Sys) Info(m string)
- func (s *Sys) Infof(m string, i ...interface{})
- func (s *Sys) Infoln(i ...interface{})
- func (s *Sys) Infov(m string, v Vars)
- func (s *Sys) IsLevel(l int) bool
- func (s *Sys) IsLevelName(l string) bool
- func (s *Sys) IsTimeStamp() bool
- func (s *Sys) IsTimeStampLevel(l int) bool
- func (s *Sys) IsTimeStampLevelName(l string) bool
- func (s *Sys) IsTimeUTC() bool
- func (s *Sys) Labels() string
- func (s *Sys) LabelsSeparator() string
- func (s *Sys) LabelsToSlice(l string) []string
- func (s *Sys) LabelsToString(l []string) string
- func (s *Sys) Level() int
- func (s *Sys) LevelName() string
- func (s *Sys) LevelNames() []string
- func (s *Sys) Levels() []int
- func (s *Sys) Panic(e error)
- func (s *Sys) Panicf(e error, i ...interface{})
- func (s *Sys) Panicln(i ...interface{})
- func (s *Sys) Panicv(e error, v Vars)
- func (s *Sys) Print(m string)
- func (s *Sys) Printf(m string, i ...interface{})
- func (s *Sys) Println(i ...interface{})
- func (s *Sys) Printv(m string, v Vars)
- func (s *Sys) SetEnvironment(e string)
- func (s *Sys) SetLabels(l string)
- func (s *Sys) SetLabelsSeparator(spr string)
- func (s *Sys) SetLevel(l int) error
- func (s *Sys) SetLevelName(l string) error
- func (s *Sys) SetTag(t string)
- func (s *Sys) SetTimeFormat(f string)
- func (s *Sys) SetTimeStamp(t bool)
- func (s *Sys) SetTimeStampLevel(l int) error
- func (s *Sys) SetTimeStampLevelName(l string) error
- func (s *Sys) SetTimeUTC(u bool)
- func (s *Sys) Tag() string
- func (s *Sys) TimeFormat() string
- func (s *Sys) TimeStampLevel() int
- func (s *Sys) TimeStampLevelName() string
- func (s *Sys) TimeStampLevelNames() []string
- func (s *Sys) TimeStampLevels() []int
- func (s *Sys) Trace(m string)
- func (s *Sys) Tracef(m string, i ...interface{})
- func (s *Sys) Traceln(i ...interface{})
- func (s *Sys) Tracev(m string, v Vars)
- func (g *Sys) Warn(s string)
- func (s *Sys) Warnf(m string, i ...interface{})
- func (s *Sys) Warnln(i ...interface{})
- func (s *Sys) Warnv(m string, v Vars)
- type SysSettings
- type SysTCP
- type SysTime
- type TCPTLS
- type TCPTLSFiles
- type Text
- func (t *Text) Close() error
- func (t *Text) Debug(s string)
- func (t *Text) Debugf(s string, i ...interface{})
- func (t *Text) Debugln(i ...interface{})
- func (t *Text) Debugv(s string, v Vars)
- func (t *Text) Environment() string
- func (t *Text) Error(e error)
- func (t *Text) Errorf(e error, i ...interface{})
- func (t *Text) Errorln(i ...interface{})
- func (t *Text) Errorv(e error, v Vars)
- func (t *Text) Fatal(e error)
- func (t *Text) Fatalf(e error, i ...interface{})
- func (t *Text) Fatalln(i ...interface{})
- func (t *Text) Fatalv(e error, v Vars)
- func (t *Text) Format() int
- func (t *Text) FormatName() string
- func (t *Text) Info(s string)
- func (t *Text) Infof(s string, i ...interface{})
- func (t *Text) Infoln(i ...interface{})
- func (t *Text) Infov(s string, v Vars)
- func (t *Text) IsLevel(l int) bool
- func (t *Text) IsLevelName(l string) bool
- func (t *Text) IsTimeStamp() bool
- func (t *Text) IsTimeStampLevel(l int) bool
- func (t *Text) IsTimeStampLevelName(l string) bool
- func (t *Text) IsTimeUTC() bool
- func (t *Text) Labels() string
- func (t *Text) LabelsSeparator() string
- func (t *Text) LabelsToSlice(l string) []string
- func (t *Text) LabelsToString(l []string) string
- func (t *Text) Level() int
- func (t *Text) LevelName() string
- func (t *Text) LevelNames() []string
- func (t *Text) Levels() []int
- func (t *Text) Panic(e error)
- func (t *Text) Panicf(e error, i ...interface{})
- func (t *Text) Panicln(i ...interface{})
- func (t *Text) Panicv(e error, v Vars)
- func (t *Text) Print(s string)
- func (t *Text) Printf(s string, i ...interface{})
- func (t *Text) Println(i ...interface{})
- func (t *Text) Printv(s string, v Vars)
- func (t *Text) SetEnvironment(e string)
- func (t *Text) SetLabels(l string)
- func (t *Text) SetLabelsSeparator(s string)
- func (t *Text) SetLevel(l int) error
- func (t *Text) SetLevelName(l string) error
- func (t *Text) SetTag(s string)
- func (t *Text) SetTimeFormat(f string)
- func (t *Text) SetTimeStamp(s bool)
- func (t *Text) SetTimeStampLevel(l int) error
- func (t *Text) SetTimeStampLevelName(l string) error
- func (t *Text) SetTimeUTC(u bool)
- func (t *Text) Tag() string
- func (t *Text) TimeFormat() string
- func (t *Text) TimeStampLevel() int
- func (t *Text) TimeStampLevelName() string
- func (t *Text) TimeStampLevelNames() []string
- func (t *Text) TimeStampLevels() []int
- func (t *Text) Trace(s string)
- func (t *Text) Tracef(s string, i ...interface{})
- func (t *Text) Traceln(i ...interface{})
- func (t *Text) Tracev(s string, v Vars)
- func (t *Text) Warn(s string)
- func (t *Text) Warnf(s string, i ...interface{})
- func (t *Text) Warnln(i ...interface{})
- func (t *Text) Warnv(s string, v Vars)
- type TextSettings
- type Time
- type Vars
Constants ¶
const ( FLUENT_KEYS_PREFIX = KEY_FIELDS FLUENT_KEYS_PREFIX_SEPARATOR = DOT_STRING )
const ( FMT_KEYS_PREFIX = KEY_FIELDS FMT_KEYS_PREFIX_SEPARATOR = DOT_STRING )
const ( GELF_KEYS_PREFIX = KEY_FIELDS GELF_KEYS_PREFIX_SEPARATOR = "_" )
const ( GELF_UDP_COMPRESSION_TYPE_GZIP = "gzip" GELF_UDP_COMPRESSION_TYPE_ZLIB = "zlib" GELF_UDP_COMPRESSION_TYPE_NONE = "none" )
const ( GELF_UDP_COMPRESSION_LEVEL_NO = int(-1) GELF_UDP_COMPRESSION_LEVEL_MIN = int(0) GELF_UDP_COMPRESSION_LEVEL_MAX = int(9) )
const ( TEXT_FORMAT = int(0) JSON_FORMAT = int(1) FMT_FORMAT = int(2) GELF_FORMAT = int(3) SYS_FORMAT = int(4) FLUENT_FORMAT = int(5) AWS_FORMAT = int(6) GCP_FORMAT = int(7) SPLUNK_FORMAT = int(8) ENTRIES_FORMAT = int(9) JOURNALD_FORMAT = int(10) )
Log formats as int
const ( PANIC_LEVEL = int(0) FATAL_LEVEL = int(1) ERROR_LEVEL = int(2) WARN_LEVEL = int(3) INFO_LEVEL = int(4) DEBUG_LEVEL = int(5) TRACE_LEVEL = int(6) // Not have prefix PRINT_LEVEL = int(7) META_LEVEL = int(8) )
Log levels as int
const ( PANIC_LEVEL_NAME = "panic" FATAL_LEVEL_NAME = "fatal" ERROR_LEVEL_NAME = "error" WARN_LEVEL_NAME = "warn" INFO_LEVEL_NAME = "info" DEBUG_LEVEL_NAME = "debug" TRACE_LEVEL_NAME = "trace" TRACE_LEVEL_PRINT = "print" )
Log level namess as string
const ( DOT_STRING = "." EMPTY_STRING = "" SPACE_STRING = " " )
Strings
const ( TIME_FORMAT_SIMPLE = "2006-01-02 15:04:05" TIME_FORMAT_SIMPLE_MILLI = "2006-01-02 15:04:05.999" TIME_FORMAT_SIMPLE_MICRO = "2006-01-02 15:04:05.999999" TIME_FORMAT_SIMPLE_NANO = "2006-01-02 15:04:05.999999999" TIME_FORMAT_ANSIC = time.ANSIC TIME_FORMAT_UNIX_DATA = time.UnixDate TIME_FORMAT_RUBY_DATA = time.RubyDate TIME_FORMAT_RFC822 = time.RFC822 TIME_FORMAT_RFC822_Z = time.RFC822Z TIME_FORMAT_RFC850 = time.RFC850 TIME_FORMAT_RFC1123 = time.RFC1123 TIME_FORMAT_RFC1123_Z = time.RFC1123Z TIME_FORMAT_RFC3339 = time.RFC3339 TIME_FORMAT_RFC3339_MILLI = "2006-01-02T15:04:05.999Z07:00" TIME_FORMAT_RFC3339_MICRO = "2006-01-02T15:04:05.999999Z07:00" TIME_FORMAT_RFC3339_NANO = time.RFC3339Nano TIME_FORMAT_KITCHEN = time.Kitchen TIME_FORMAT_STAMP = time.Stamp TIME_FORMAT_STAMP_MILLI = time.StampMilli TIME_FORMAT_STAMP_MICRO = time.StampMicro TIME_FORMAT_STAMP_NANO = time.StampNano )
Default constants of time formats
const ( TIME_STAMP_LEVEL_DEFAULT = int(0) TIME_STAMP_LEVEL_MILLI = int(1) TIME_STAMP_LEVEL_MICRO = int(2) TIME_STAMP_LEVEL_NANO = int(3) )
Default constants of time formats
const ( TIME_STAMP_LEVEL_NAME_DEFAULT = "default" TIME_STAMP_LEVEL_NAME_MILLI = "milli" TIME_STAMP_LEVEL_NAME_MICRO = "micro" TIME_STAMP_LEVEL_NAME_NANO = "nano" )
Default constants of timestamp level names
const ( KEY_PATH = "path" KEY_NAME = "name" KEY_VALUE = "value" KEY_FIELDS = "fields" )
Keys
const ( STR_D = "%d" STR_F = "%f" STR_T = "%t" STR_V = "%v" )
const ( JSON_KEYS_PREFIX = KEY_FIELDS JSON_KEYS_PREFIX_SEPARATOR = DOT_STRING )
const ( SYS_DEFAULT_PORT_UDP = 514 SYS_DEFAULT_PORT_TCP = 6514 )
SYS_DEFAULT_PORTS
const ( SYS_FORMAT_UNIX = "unix" SYS_FORMAT_RFC3164 = "rfc3164" SYS_FORMAT_RFC5424 = "rfc5424" )
const ( SYS_KEYS_PREFIX = KEY_FIELDS SYS_KEYS_PREFIX_SEPARATOR = DOT_STRING )
const ( TEXT_VARS_SEPARATOR = ":" + SPACE_STRING TEXT_VAR_SEPARATOR = LABELS_SEPARATOR + SPACE_STRING TEXT_VAR_EQUALLY = "=" )
const ( URL_TYPE_HTTP = "http" URL_TYPE_SOCKET = "socket" )
const ( URL_PORT_MIN = 1 URL_PORT_MAX = 65535 )
const ( URL_SCHEME_UDP = "udp" URL_SCHEME_TCP = "tcp" URL_SCHEME_TCP_TLS = "tcp+tls" URL_SCHEME_UNIX = "unix" URL_SCHEME_UNIXGRAM = "unixgram" )
const ( URL_HEAD_SEPARATOR = "://" URL_PORT_SEPARATOR = ":" )
const FLUENT_NAME = "fluent"
FLUENT_NAME
const FMT_NAME = "fmtlog"
FMT_NAME
const GELF_DEFAULT_PORT = 12201
GELF_DEFAULT_PORT
const GELF_NAME = "gelf"
GELF_NAME
const GELF_PROTOCOL_VERSION = "1.1"
GELF_PROTOCOL_VERSION
const JSON_NAME = "json"
JSON_NAME
const LABELS_SEPARATOR = ","
const NAME = "Logs"
Name
const SYS_NAME = "syslog"
SYS_NAME
const TEXT_NAME = "text"
TEXT_NAME
Variables ¶
This section is empty.
Functions ¶
func IsSocket ¶
IsSocket returns true if the string is a socket (udp, tcp, tcp+tls, unix, unixgram) URL.
func SocketAddress ¶
func SocketAddress(c *Connection, udpPort int, tcpPort int) error
SocketAddress
func SocketConnection ¶
func SocketConnection(c *Connection, udpPort int, tcpPort int) error
SocketConnection
Types ¶
type Connection ¶
type Connection struct { URL string `json:"url" yaml:"url" xml:"url" toml:"url"` Scheme string `json:"scheme" yaml:"scheme" xml:"scheme" toml:"scheme"` Address string `json:"address" yaml:"address" xml:"address" toml:"address"` Host string `json:"host" yaml:"host" xml:"host" toml:"host"` Port int `json:"port" yaml:"port" xml:"port" toml:"port"` SocketPath string `json:"socket_path" yaml:"socket_path" xml:"socket_path" toml:"socket_path"` Timeout int `json:"timeout" yaml:"timeout" xml:"timeout" toml:"timeout"` WriteTimeout int `json:"write_timeout" yaml:"write_timeout" xml:"write_timeout" toml:"write_timeout"` RetryWait int `json:"retry_wait" yaml:"retry_wait" xml:"retry_wait" toml:"retry_wait"` MaxRetry int `json:"max_retry" yaml:"max_retry" xml:"max_retry" toml:"max_retry"` MaxRetryWait int `json:"max_retry_wait" yaml:"max_retry_wait" xml:"max_retry_wait" toml:"max_retry_wait"` BufferLimit int `json:"buffer_limit" yaml:"buffer_limit" xml:"buffer_limit" toml:"buffer_limit"` IsAsync bool `json:"is_async" yaml:"is_async" xml:"is_async" toml:"is_async"` }
Connection
type FMT ¶
type FMT struct {
// contains filtered or unexported fields
}
FMT
func (*FMT) IsTimeStampLevelName ¶
IsTimeStampLevelName
func (*FMT) SetTimeStampLevelName ¶
SetTimeStampLevelName
type Fluent ¶
type Fluent struct {
// contains filtered or unexported fields
}
Fluent
func (*Fluent) IsTimeStampLevelName ¶
IsTimeStampLevelName
func (*Fluent) SetLabelsSeparator ¶
SetLabelsSeparator
func (*Fluent) SetTimeStampLevel ¶
SetTimeStampLevel
func (*Fluent) SetTimeStampLevelName ¶
SetTimeStampLevelName
func (*Fluent) TimeStampLevelNames ¶
TimeStampLevelNames
type Formatter ¶
type Formatter struct { Stdout *StdOE `json:"stdout" yaml:"stdout" xml:"stdout" toml:"stdout"` Stderr *StdOE `json:"stderr" yaml:"stderr" xml:"stderr" toml:"stderr"` Level int `json:"level" yaml:"level" xml:"level" toml:"level"` Labels *Labels `json:"labels" yaml:"labels" xml:"labels" toml:"labels"` Time *Time `json:"time" yaml:"time" xml:"time" toml:"time"` Environment string `json:"environment" yaml:"environment" xml:"environment" toml:"environment"` Tag string `json:"tag" yaml:"tag" xml:"tag" toml:"tag"` Keys *Keys `json:"keys" yaml:"keys" xml:"keys" toml:"keys"` }
Formatter
type GELF ¶
type GELF struct {
// contains filtered or unexported fields
}
GELF
func (*GELF) IsTimeStampLevelName ¶
IsTimeStampLevelName
func (*GELF) SetTimeStampLevelName ¶
SetTimeStampLevelName
func (*GELF) TimeStampLevelNames ¶
TimeStampLevelNames
type GELFSettings ¶
type GELFSettings struct { Connection *Connection `json:"connection" yaml:"connection" xml:"connection" toml:"connection"` Hostname string `json:"hostname" yaml:"hostname" xml:"hostname" toml:"hostname"` Facility string `json:"facility" yaml:"facility" xml:"facility" toml:"facility"` UDP *GELFUDP `json:"udp" yaml:"udp" xml:"udp" toml:"udp"` TCP *GELFTCP `json:"tcp" yaml:"tcp" xml:"tcp" toml:"tcp"` }
GELFSettings
type GELFTCP ¶
type GELFTCP struct { Reconnection *GELFTCPReconnection `json:"reconnection" yaml:"reconnection" xml:"reconnection" toml:"reconnection"` TLS *TCPTLS `json:"tls" yaml:"tls" xml:"tls" toml:"tls"` }
GELFTCP
type GELFTCPReconnection ¶
type GELFTCPReconnection struct { Max int `json:"max" yaml:"max" xml:"max" toml:"max"` Delay int `json:"delay" yaml:"delay" xml:"delay" toml:"delay"` }
GELFTCPReconnection
type GELFUDP ¶
type GELFUDP struct {
Compression *GELFUDPCompression `json:"compression" yaml:"compression" xml:"compression" toml:"compression"`
}
GELFUDP
type GELFUDPCompression ¶
type GELFUDPCompression struct { Type string `json:"type" yaml:"type" xml:"type" toml:"type"` Level int `json:"level" yaml:"level" xml:"level" toml:"level"` }
GELFUDPCompression
type JSON ¶
type JSON struct {
// contains filtered or unexported fields
}
JSON
func (*JSON) IsTimeStampLevelName ¶
IsTimeStampLevelName
func (*JSON) SetTimeStampLevelName ¶
SetTimeStampLevelName
func (*JSON) TimeStampLevelNames ¶
TimeStampLevelNames
type JSONKeys ¶
type JSONKeys struct { Level string `json:"level" yaml:"level" xml:"level" toml:"level"` Labels string `json:"labels" yaml:"labels" xml:"labels" toml:"labels"` Message string `json:"msg" yaml:"msg" xml:"msg" toml:"msg"` Time string `json:"time" yaml:"time" xml:"time" toml:"time"` Timestamp string `json:"timestamp" yaml:"timestamp" xml:"timestamp" toml:"timestamp"` Environment string `json:"environment" yaml:"environment" xml:"environment" toml:"environment"` Tag string `json:"tag" yaml:"tag" xml:"tag" toml:"tag"` }
JSONKeys
type JSONSettings ¶
type JSONSettings struct { KeysPrefix string `json:"keys_prefix" yaml:"keys_prefix" xml:"keys_prefix" toml:"keys_prefix"` KeysPrefixSeparator string `json:"keys_prefix_separator" yaml:"keys_prefix_separator" xml:"keys_prefix_separator" toml:"keys_prefix_separator"` Keys *JSONKeys `json:"keys" yaml:"keys" xml:"keys" toml:"keys"` }
JSONSettings
type Keys ¶
type Keys struct { Names *KeysNames `json:"names" yaml:"names" xml:"names" toml:"names"` Prefix string `json:"prefix" yaml:"prefix" xml:"prefix" toml:"prefix"` PrefixSeparator string `json:"prefix_separator" yaml:"prefix_separator" xml:"prefix_separator" toml:"prefix_separator"` }
Keys
type KeysNames ¶
type KeysNames struct { Level string `json:"level" yaml:"level" xml:"level" toml:"level"` Labels string `json:"labels" yaml:"labels" xml:"labels" toml:"labels"` Message string `json:"msg" yaml:"msg" xml:"msg" toml:"msg"` Time string `json:"time" yaml:"time" xml:"time" toml:"time"` Timestamp string `json:"timestamp" yaml:"timestamp" xml:"timestamp" toml:"timestamp"` Environment string `json:"environment" yaml:"environment" xml:"environment" toml:"environment"` Tag string `json:"tag" yaml:"tag" xml:"tag" toml:"tag"` }
KeysNames
type Labels ¶
type Labels struct { String string `json:"string" yaml:"string" xml:"string" toml:"string"` Separator string `json:"separator" yaml:"separator" xml:"separator" toml:"separator"` }
Labels
type Logs ¶
type Logs struct {
// contains filtered or unexported fields
}
Logs
func (*Logs) IsTimeStampLevelName ¶
IsTimeStampLevelName
func (*Logs) SetTimeStampLevelName ¶
SetTimeStampLevelName
func (*Logs) TimeStampLevelNames ¶
TimeStampLevelNames
type StdOE ¶
type StdOE struct { Logger *log.Logger Writer io.Writer IsPrintable bool `json:"is_printable" yaml:"is_printable" xml:"is_printable" toml:"is_printable"` }
StdOE (Stdout, Stderr)
type Sys ¶
type Sys struct {
// contains filtered or unexported fields
}
Sys
func (*Sys) IsTimeStampLevelName ¶
IsTimeStampLevelName
func (*Sys) SetTimeStampLevelName ¶
SetTimeStampLevelName
type SysSettings ¶
type SysSettings struct { Connection *Connection `json:"connection" yaml:"connection" xml:"connection" toml:"connection"` Hostname string `json:"hostname" yaml:"hostname" xml:"hostname" toml:"hostname"` Facility string `json:"facility" yaml:"facility" xml:"facility" toml:"facility"` AppName string `json:"app_name" yaml:"app_name" xml:"app_name" toml:"app_name"` Format string `json:"format" yaml:"format" xml:"format" toml:"format"` Tag string `json:"tag" yaml:"tag" xml:"tag" toml:"tag"` TCP *SysTCP `json:"tcp" yaml:"tcp" xml:"tcp" toml:"tcp"` Time *SysTime `json:"time" yaml:"time" xml:"time" toml:"time"` }
SysSettings
type SysTCP ¶
type SysTCP struct {
TLS *TCPTLS `json:"tls" yaml:"tls" xml:"tls" toml:"tls"`
}
SysTCP
type SysTime ¶
type SysTime struct { IsUTC bool `json:"is_utc" yaml:"is_utc" xml:"is_utc" toml:"is_utc"` Level int `json:"stamp_level" yaml:"stamp_level" xml:"stamp_level" toml:"stamp_level"` }
SysTime
type TCPTLS ¶
type TCPTLS struct { // IsValuesUsed bool `json:"is_values_used" yaml:"is_values_used" xml:"is_values_used" toml:"is_values_used"` // Values *TCPTLSValues `json:"values" yaml:"values" xml:"values" toml:"values"` Files *TCPTLSFiles `json:"files" yaml:"files" xml:"files" toml:"files"` Passphrase string `json:"passphrase" yaml:"passphrase" xml:"passphrase" toml:"passphrase"` IsInsecure bool `json:"is_insecure" yaml:"is_insecure" xml:"is_insecure" toml:"is_insecure"` }
TCPTLS
type TCPTLSFiles ¶
type TCPTLSFiles struct { RootCACrt string `json:"root_ca_crt" yaml:"root_ca_crt" xml:"root_ca_crt" toml:"root_ca_crt"` ClientCrt string `json:"client_crt" yaml:"client_crt" xml:"client_crt" toml:"client_crt"` ClientKey string `json:"client_key" yaml:"client_key" xml:"client_key" toml:"client_key"` }
TCPTLSFiles
type Text ¶
type Text struct {
// contains filtered or unexported fields
}
Text
func (*Text) IsTimeStampLevelName ¶
IsTimeStampLevelName
func (*Text) SetTimeStampLevelName ¶
SetTimeStampLevelName
func (*Text) TimeStampLevelNames ¶
TimeStampLevelNames
type TextSettings ¶
type TextSettings struct {
IsColorize bool `json:"is_colorize" yaml:"is_colorize" xml:"is_colorize" toml:"is_colorize"`
}
TextSettings
type Time ¶
type Time struct { IsUTC bool `json:"is_utc" yaml:"is_utc" xml:"is_utc" toml:"is_utc"` IsStamp bool `json:"is_stamp" yaml:"is_stamp" xml:"is_stamp" toml:"is_stamp"` StampLevel int `json:"stamp_level" yaml:"stamp_level" xml:"stamp_level" toml:"stamp_level"` StampLevelName string `json:"stamp_level_name" yaml:"stamp_level_name" xml:"stamp_level_name" toml:"stamp_level_name"` Format string `json:"format" yaml:"format" xml:"format" toml:"format"` }
Time