Versions in this module Expand all Collapse all v0 v0.0.6 Feb 1, 2024 Changes in this version + const DEBUG + const ERROR + const INFO + const LUTC + const Ldate + const Llongfile + const Lmicroseconds + const Lshortfile + const LstdFlags + const Ltime + const NOLOG + const WARN + var DefaultCaller = Caller(3) + var DefaultTimestamp = TimestampFormat(time.Now, time.RFC3339Nano) + var DefaultTimestampUTC = TimestampFormat(func() time.Time { ... }, time.RFC3339Nano) + var ErrInvalidKey = errors.New("invalid key") + var ErrNilKey = errors.New("nil key") + var ErrUnsupportedKeyType = errors.New("unsupported key type") + var ErrUnsupportedValueType = errors.New("unsupported value type") + var LEVEL_NAME map[int]string + var LOG_LEVEL int + var OPEN_STACK bool + func Debug(v ...interface{}) + func Debugf(format string, v ...interface{}) + func Error(v ...interface{}) + func Errorf(format string, v ...interface{}) + func Info(v ...interface{}) + func Infof(format string, v ...interface{}) + func Log(v ...interface{}) + func Logf(format string, v ...interface{}) + func MarshalKeyvals(keyvals ...interface{}) ([]byte, error) + func NewSyncWriter(w io.Writer) io.Writer + func OpenStack() + func SetFlags(flag int) + func SetLevel(level int) + func Warn(v ...interface{}) + func Warnf(format string, v ...interface{}) + type Encoder struct + func NewEncoder(w io.Writer) *Encoder + func (enc *Encoder) EncodeKeyval(key, value interface{}, needQuoted bool) error + func (enc *Encoder) EncodeKeyvals(keyvals ...interface{}) error + func (enc *Encoder) EncodeKeyvalsWithQuoted(keyvals ...interface{}) error + func (enc *Encoder) EndRecord() error + func (enc *Encoder) Reset() + type InfluxdbLogger struct + func (l *InfluxdbLogger) KVLog(keyvals ...interface{}) error + func (l *InfluxdbLogger) SetFlags(flag int) + func (l *InfluxdbLogger) VLog(v ...interface{}) error + func (l InfluxdbLogger) SetDepth(depth int) Logger + func (l InfluxdbLogger) WithHeader(keyvals ...interface{}) Logger + type Logger interface + KVLog func(keyvals ...interface{}) error + SetDepth func(depth int) Logger + SetFlags func(flag int) + VLog func(keyvals ...interface{}) error + WithHeader func(keyvals ...interface{}) Logger + func NewInfluxdbLogger(w io.Writer, measurement string, kv ...string) Logger + func NewOriginLogger(w io.Writer) Logger + func WithHeader(keyvals ...interface{}) Logger + type MarshalerError struct + Err error + Type reflect.Type + func (e *MarshalerError) Error() string + type OriginLogger struct + func (this *OriginLogger) KVLog(v ...interface{}) error + func (this *OriginLogger) SetFlags(flag int) + func (this *OriginLogger) VLog(v ...interface{}) error + func (this OriginLogger) SetDepth(depth int) Logger + func (this OriginLogger) WithHeader(keyvals ...interface{}) Logger + type SwapLogger struct + func (l *SwapLogger) Log(keyvals ...interface{}) error + func (l *SwapLogger) Swap(logger Logger) + type Valuer func() interface + func Caller(depth int) Valuer + func Timestamp(t func() time.Time) Valuer + func TimestampFormat(t func() time.Time, layout string) Valuer