Versions in this module Expand all Collapse all v0 v0.7.4 May 12, 2016 v0.7.3 May 12, 2016 v0.7.2 May 12, 2016 v0.7.1 May 12, 2016 v0.7.0 May 12, 2016 Changes in this version + const EXCLUDE_DATA + const EXCLUDE_FILE + const EXCLUDE_LEVEL + const EXCLUDE_LINE + const EXCLUDE_MESSAGE + const EXCLUDE_METHOD + const EXCLUDE_NONE + const EXCLUDE_TIMESTAMP + const MaxMessageSize — darwin/amd64, js/wasm, linux/amd64 + const TruncatePostfix — darwin/amd64, js/wasm, linux/amd64 + var LOG_ALL = defineLogLevel("all", 30) + var LOG_DEBUG = defineLogLevel("debug", 16) + var LOG_DEBUG1 = defineLogLevel("debug1", 17) + var LOG_DEBUG2 = defineLogLevel("debug2", 18) + var LOG_ERROR = defineLogLevel("error", 5) + var LOG_FATAL = defineLogLevel("fatal", 1) + var LOG_INFO = defineLogLevel("info", 15) + var LOG_OFF = defineLogLevel("off", 0) + var LOG_WARN = defineLogLevel("warn", 10) + func ClearLoggerRegexp() + func EnterTestMode(logLevel ...LogLevel) + func Init(c *Config) + func SetLoggerRegexp(pattern string, level LogLevel) error + type BaseLogger struct + func (l *BaseLogger) Level() LogLevel + func (l *BaseLogger) Log(x LogLevel, m string, d map[string]interface{}) + type Codec interface + EncodeRecord func(record *Record) ([]byte, error) + func NewJsonCodec() Codec + type Config struct + Codec Codec + EnableLOC bool + Level LogLevel + Sinks []Sink + type IOSink struct + func NewFileSink(path string) *IOSink + func NewIOSink(file *os.File) *IOSink + func (x *IOSink) AddRecord(record *Record) + func (x *IOSink) Flush() + func (x *IOSink) GetCodec() Codec + func (x *IOSink) SetCodec(codec Codec) + type JsonCodec struct + func (j *JsonCodec) EncodeRecord(record *Record) ([]byte, error) + type JsonPrettifier struct + func NewJsonPrettifier(flag int) *JsonPrettifier + func (p *JsonPrettifier) DecodeJsonLogEntry(logEntry string) (*Record, error) + func (p *JsonPrettifier) EncodeRecord(record *Record) ([]byte, error) + type L interface + Level func() LogLevel + Log func(x LogLevel, m string, d map[string]interface{}) + type LogLevel struct + Name string + Priority int + func GetLogLevel(name string) (LogLevel, error) + func (l LogLevel) String() string + func (x *LogLevel) UnmarshalJSON(data []byte) error + func (x LogLevel) MarshalJSON() ([]byte, error) + type Logger struct + func NewLogger(name string) *Logger + func (l *Logger) Copy() (rv *Logger) + func (l *Logger) Debug(m string) + func (l *Logger) Debug1(m string) + func (l *Logger) Debug1d(d map[string]interface{}, m string) + func (l *Logger) Debug1df(d map[string]interface{}, f string, a ...interface{}) + func (l *Logger) Debug1f(f string, a ...interface{}) + func (l *Logger) Debug2(m string) + func (l *Logger) Debug2d(d map[string]interface{}, m string) + func (l *Logger) Debug2df(d map[string]interface{}, f string, a ...interface{}) + func (l *Logger) Debug2f(f string, a ...interface{}) + func (l *Logger) Debugd(d map[string]interface{}, m string) + func (l *Logger) Debugdf(d map[string]interface{}, f string, a ...interface{}) + func (l *Logger) Debugf(f string, a ...interface{}) + func (l *Logger) Error(m string) + func (l *Logger) Errord(d map[string]interface{}, m string) + func (l *Logger) Errordf(d map[string]interface{}, f string, a ...interface{}) + func (l *Logger) Errorf(f string, a ...interface{}) + func (l *Logger) Fatal(m string) + func (l *Logger) Fatald(d map[string]interface{}, m string) + func (l *Logger) Fataldf(d map[string]interface{}, f string, a ...interface{}) + func (l *Logger) Fatalf(f string, a ...interface{}) + func (l *Logger) Get(k string) (rv interface{}) + func (l *Logger) Info(m string) + func (l *Logger) Infod(d map[string]interface{}, m string) + func (l *Logger) Infodf(d map[string]interface{}, f string, a ...interface{}) + func (l *Logger) Infof(f string, a ...interface{}) + func (l *Logger) Log(x LogLevel, m string, d map[string]interface{}) + func (l *Logger) Set(k string, v interface{}) + func (l *Logger) Warn(m string) + func (l *Logger) Warnd(d map[string]interface{}, m string) + func (l *Logger) Warndf(d map[string]interface{}, f string, a ...interface{}) + func (l *Logger) Warnf(f string, a ...interface{}) + type Record struct + Data map[string]interface{} + File string + Level LogLevel + Line int + Message string + Method string + Pid int + Source string + Timestamp RecordTimestamp + func NewRecord(s string, l LogLevel, m string, d map[string]interface{}) *Record + type RecordTimestamp float64 + func (t RecordTimestamp) MarshalJSON() ([]byte, error) + type Sink interface + AddRecord func(record *Record) + Flush func() + GetCodec func() Codec + SetCodec func(codec Codec) + type Syslog struct — darwin/amd64, js/wasm, linux/amd64 + func NewSyslogSink(namespace string) *Syslog + func (s *Syslog) AddRecord(record *Record) + func (s *Syslog) Flush() + func (s *Syslog) GetCodec() Codec + func (s *Syslog) SetCodec(codec Codec) + type TestingSink struct + func GetMeTheGlobalTestSink() *TestingSink + func NewTestingSink() *TestingSink + func (tSink *TestingSink) AddRecord(record *Record) + func (tSink *TestingSink) Flush() + func (tSink *TestingSink) GetCodec() Codec + func (tSink *TestingSink) Records() []*Record + func (tSink *TestingSink) SetCodec(codec Codec) v0.7.0-rc1 May 12, 2016 v0.7.0-23 Apr 19, 2016