xlog

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package xlog provides an extensible acme library

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCallerSkip

func AddCallerSkip(n int) xlogcore.XLog

AddCallerSkip increases the number of callers skipped by caller annotation.

func Debug

func Debug(args ...interface{})

Debug construct and log a Debug message.

func Debugf

func Debugf(tpl string, args ...interface{})

Debugf construct and log a Debug message.

func Error

func Error(args ...interface{})

Error construct and log a Error message.

func Errorf

func Errorf(tpl string, args ...interface{})

Errorf construct and log a Error message.

func Fast

func Fast() xlogcore.FastXLog

Fast converting XLog to FastXLog. The operation is quite inexpensive.

func Fatal

func Fatal(args ...interface{})

Fatal construct and log a Fatal message, then calls os.Exit(1).

func Fatalf

func Fatalf(tpl string, args ...interface{})

Fatalf construct and log a Fatal message.

func FromCtx

func FromCtx(ctx context.Context) xlogcore.XLog

FromCtx gets the XLog from the ctx.

func Info

func Info(args ...interface{})

Info construct and log a Info message.

func Infof

func Infof(tpl string, args ...interface{})

Infof construct and log a Info message.

func NewFastXLog

func NewFastXLog(config xlogcore.Config) (xlogcore.FastXLog, error)

NewFastXLog returns FastXLog.

func NewXLog

func NewXLog(config xlogcore.Config) (xlogcore.XLog, error)

NewXLog returns XLog.

func Panic

func Panic(args ...interface{})

Panic construct and log a Panic message, then panics.

func Panicf

func Panicf(tpl string, args ...interface{})

Panicf construct and log a Panic message.

func SetConfig

func SetConfig(cfg xlogcore.Config) (err error)

SetConfig reconfigures the dft logger.

func Sync

func Sync()

Sync flushes buffered logs. Users should call Sync before exiting.

func ToCtx

func ToCtx(ctx context.Context, kvs ...interface{}) context.Context

ToCtx adds the XLog, with a variadic number of fields, to ctx and returns the resulting context.Context.

func Warn

func Warn(args ...interface{})

Warn construct and log a Warn message.

func Warnf

func Warnf(tpl string, args ...interface{})

Warnf construct and log a Warn message.

func With

func With(kvs ...interface{}) xlogcore.XLog

With adds a variadic number of fields to the logging context.

func WithOptions

func WithOptions(opts ...xlogcore.Option) xlogcore.XLog

WithOptions clones the current Logger, applies the supplied Options, and returns the resulting Logger. It's safe to use concurrently.

Types

This section is empty.

Directories

Path Synopsis
Package xlogcore defines xlog interface.
Package xlogcore defines xlog interface.
Package zap wraps uber zap package.
Package zap wraps uber zap package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL