logx

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Code generated by log-gen. DO NOT EDIT.

Index

Constants

View Source
const (
	JSON = "json"
	TEXT = "text"
)

Variables

This section is empty.

Functions

func DPanic

func DPanic(args ...interface{})

func DPanicf

func DPanicf(template string, args ...interface{})

func DPanicw

func DPanicw(msg string, keysAndValues ...interface{})

func Debug

func Debug(args ...interface{})

func Debugf

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

func Debugw

func Debugw(msg string, keysAndValues ...interface{})

func Error

func Error(args ...interface{})

func Errorf

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

func Errorw

func Errorw(msg string, keysAndValues ...interface{})

func Fatal

func Fatal(args ...interface{})

func Fatalf

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

func Fatalw

func Fatalw(msg string, keysAndValues ...interface{})

func GetLogger added in v0.0.6

func GetLogger() *zap.SugaredLogger

func Info

func Info(args ...interface{})

func Infof

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

func Infow

func Infow(msg string, keysAndValues ...interface{})

func Init

func Init(opts ...Opt)

func Panic

func Panic(args ...interface{})

func Panicf

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

func Panicw

func Panicw(msg string, keysAndValues ...interface{})

func Sync

func Sync() error

func Warn

func Warn(args ...interface{})

func Warnf

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

func Warnw

func Warnw(msg string, keysAndValues ...interface{})

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

type Logger

type Logger = zap.Logger

func Desugar

func Desugar() *Logger

type Opt

type Opt func(*Config)

func AddCore

func AddCore(core ...zapcore.Core) Opt

func AddHooks

func AddHooks(hooks ...func(entry zapcore.Entry) error) Opt

func SetDisableDefault

func SetDisableDefault(b bool) Opt

func SetEncoder

func SetEncoder(en zapcore.Encoder) Opt

func SetFormatType

func SetFormatType(t string) Opt

func SetLogLevel

func SetLogLevel(l string) Opt

func SetLogPath

func SetLogPath(p string) Opt

func SetLogSuffix

func SetLogSuffix(s string) Opt

func SetMaxAge

func SetMaxAge(age time.Duration) Opt

func SetRotationTime

func SetRotationTime(tme time.Duration) Opt

type SugaredLogger

type SugaredLogger = zap.SugaredLogger

func Named

func Named(name string) *SugaredLogger

func With

func With(args ...interface{}) *SugaredLogger

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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