Documentation
¶
Index ¶
- Constants
- Variables
- func Debug(ctx context.Context, msg string, keyvals ...interface{})
- func Enabled(level Level) bool
- func Error(ctx context.Context, msg string, keyvals ...interface{})
- func Fatal(ctx context.Context, msg string, keyvals ...interface{})
- func GetStack(calldepth int) []byte
- func Info(ctx context.Context, msg string, keyvals ...interface{})
- func SetLevel(level Level)
- func SetLevelByName(levelName string)
- func SetLogger(logger *Logger)
- func Trace(ctx context.Context, msg string, keyvals ...interface{})
- func Warning(ctx context.Context, msg string, keyvals ...interface{})
- func WithContext(ctx context.Context, keyvals ...interface{}) context.Context
- type Appender
- type Context
- type Entry
- type FileAppender
- type Formatter
- type Level
- type LevelName
- type Logger
- func (logger *Logger) Debug(ctx context.Context, msg string, keyvals ...interface{})
- func (logger *Logger) Enabled(level Level) bool
- func (logger *Logger) Error(ctx context.Context, msg string, keyvals ...interface{})
- func (logger *Logger) Fatal(ctx context.Context, msg string, keyvals ...interface{})
- func (logger *Logger) GetLevel() Level
- func (logger *Logger) Info(ctx context.Context, msg string, keyvals ...interface{})
- func (logger *Logger) SetLevel(level Level)
- func (logger *Logger) Tag(tag string) *TagLogger
- func (logger *Logger) Trace(ctx context.Context, msg string, keyvals ...interface{})
- func (logger *Logger) Warning(ctx context.Context, msg string, keyvals ...interface{})
- type RotatableAppender
- type StdAppender
- type TagLogger
- func (logger *TagLogger) Debug(ctx context.Context, msg string, keyvals ...interface{})
- func (logger *TagLogger) Error(ctx context.Context, msg string, keyvals ...interface{})
- func (logger *TagLogger) Fatal(ctx context.Context, msg string, keyvals ...interface{})
- func (logger *TagLogger) Info(ctx context.Context, msg string, keyvals ...interface{})
- func (logger *TagLogger) Trace(ctx context.Context, msg string, keyvals ...interface{})
- func (logger *TagLogger) Warning(ctx context.Context, msg string, keyvals ...interface{})
- type Valuer
Constants ¶
View Source
const ( OpenFlag = os.O_CREATE | os.O_APPEND | os.O_WRONLY | syscall.O_DSYNC OpenPerm = 0644 )
View Source
const MaxCachedBufferSize = 1 << 16 // 64KB
Variables ¶
View Source
var ErrMissingValue = errors.New("(MISSING)")
View Source
var (
PipeKVFormatter = &pipeKvFormatter{}
)
View Source
var RotateSignal = syscall.SIGUSR1
Functions ¶
func SetLevelByName ¶
func SetLevelByName(levelName string)
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func (*Context) WithPrefix ¶
type FileAppender ¶
func NewFileAppender ¶
func NewFileAppender(levelMask Level, fileName string, formatter Formatter) (appender *FileAppender, err error)
func (*FileAppender) Append ¶
func (appender *FileAppender) Append(entry *Entry)
func (*FileAppender) DisableLock ¶
func (appender *FileAppender) DisableLock()
func (*FileAppender) Rotate ¶
func (appender *FileAppender) Rotate()
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
type RotatableAppender ¶
type RotatableAppender interface { Appender Rotate() }
type StdAppender ¶
func NewStdAppender ¶
func NewStdAppender(formatter Formatter) *StdAppender
func (*StdAppender) Append ¶
func (appender *StdAppender) Append(entry *Entry)
Click to show internal directories.
Click to hide internal directories.