Documentation ¶
Index ¶
- func ConvertToString(fields []Field) string
- type BitColor
- type ConsoleLogger
- type Field
- func Blob(key string, payload []uint8) Field
- func Bool(key string, val bool) Field
- func Error(key string, err error) Field
- func Int(key string, val int) Field
- func Int16(key string, val int16) Field
- func Int32(key string, val int32) Field
- func Int64(key string, val int64) Field
- func Int8(key string, val int8) Field
- func Interface(key string, val interface{}) Field
- func String(key string, val string) Field
- func StringSlice(key string, val []string) Field
- func Stringer(key string, val fmt.Stringer) Field
- func StringerSlice(key string, val []fmt.Stringer) Field
- func Table(key string, columns []string, rows [][]string) Field
- func TableStringer(key string, columns []string, rows [][]fmt.Stringer) Field
- func Uint(key string, val uint) Field
- func Uint16(key string, val uint16) Field
- func Uint32(key string, val uint32) Field
- func Uint64(key string, val uint64) Field
- func Uint8(key string, val uint8) Field
- type FileLogger
- type Log
- func (l *Log) CheckDebug() bool
- func (l *Log) CheckInfo() bool
- func (l *Log) CheckTrace() bool
- func (l *Log) Debug(name string, fields ...Field)
- func (l *Log) Err(err error)
- func (l *Log) Error(name string, fields ...Field)
- func (l *Log) Info(name string, fields ...Field)
- func (l *Log) InfoColor(color BitColor, name string, fields ...Field)
- func (l *Log) LogLevel() clogint.LogLevel
- func (l *Log) Panic(name string, fields ...Field)
- func (l *Log) SetLogLevel(level clogint.LogLevel)
- func (l *Log) SetLogLevelUsingString(logLevelString string, defaultLevel clogint.LogLevel)
- func (l *Log) SetLogLevelUsingVerbosity(verbosityCount int)
- func (l *Log) Trace(name string, fields ...Field)
- func (l *Log) Warn(name string, fields ...Field)
- func (l *Log) With(name string, fields ...Field) *Log
- type Logger
- type MultiLogger
- type OperatingSystem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToString ¶
Types ¶
type BitColor ¶
type BitColor = uint8
const ( ForegroundBlue BitColor = 0x1 ForegroundGreen BitColor = 0x2 ForegroundRed BitColor = 0x4 ForegroundIntensity BitColor = 0x8 ForegroundMask BitColor = (ForegroundRed | ForegroundBlue | ForegroundGreen | ForegroundIntensity) BackgroundBlue BitColor = 0x10 BackgroundGreen BitColor = 0x20 BackgroundRed BitColor = 0x40 BackgroundIntensity BitColor = 0x80 BackgroundMask BitColor = (BackgroundRed | BackgroundBlue | BackgroundGreen | BackgroundIntensity) )
type ConsoleLogger ¶
type ConsoleLogger struct {
// contains filtered or unexported fields
}
func NewConsoleLogger ¶
func NewConsoleLogger() *ConsoleLogger
func NewConsoleLoggerWithWriter ¶
func NewConsoleLoggerWithWriter(writer io.Writer) *ConsoleLogger
type Field ¶
func StringSlice ¶
type FileLogger ¶
type FileLogger struct {
// contains filtered or unexported fields
}
func NewFileLogger ¶
func NewFileLogger(directory string, application string) (*FileLogger, error)
type Log ¶
type Log struct {
// contains filtered or unexported fields
}
func DefaultFileLog ¶
func DefaultLog ¶
func DefaultLog() *Log
func NewMultiLog ¶
func (*Log) CheckDebug ¶
func (*Log) CheckTrace ¶
func (*Log) SetLogLevel ¶
func (*Log) SetLogLevelUsingString ¶
func (*Log) SetLogLevelUsingVerbosity ¶
type MultiLogger ¶
type MultiLogger struct {
// contains filtered or unexported fields
}
func NewMultiLogger ¶
func NewMultiLogger(loggers ...Logger) (*MultiLogger, error)
type OperatingSystem ¶
type OperatingSystem int
const ( Linux OperatingSystem = iota Windows MacOS )
func DetectOperatingSystem ¶
func DetectOperatingSystem() OperatingSystem
Click to show internal directories.
Click to hide internal directories.