logcore

package
v0.0.0-...-29e02a0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppLogger

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

func New

func New(c *Config) *AppLogger

func (*AppLogger) DPanic

func (l *AppLogger) DPanic(args ...interface{})

func (*AppLogger) DPanicf

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

func (*AppLogger) Debug

func (l *AppLogger) Debug(args ...interface{})

func formatArgs(args []interface{}) string { return strings.TrimSuffix(fmt.Sprintln(args...), "\n") }

func (*AppLogger) Debugf

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

func (*AppLogger) Error

func (l *AppLogger) Error(args ...interface{})

func (*AppLogger) Errorf

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

func (*AppLogger) Fatal

func (l *AppLogger) Fatal(args ...interface{})

func (*AppLogger) Fatalf

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

func (*AppLogger) GetLevel

func (logger *AppLogger) GetLevel() (string, string)

func (*AppLogger) GetNameLogger

func (logger *AppLogger) GetNameLogger(names ...string) *AppLogger

func (*AppLogger) GetZapLogger

func (l *AppLogger) GetZapLogger() *zap.Logger

func (*AppLogger) Info

func (l *AppLogger) Info(args ...interface{})

func (*AppLogger) Infof

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

func (*AppLogger) Panic

func (l *AppLogger) Panic(args ...interface{})

func (*AppLogger) Panicf

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

func (*AppLogger) SetLevel

func (logger *AppLogger) SetLevel(levelConsole string, levelFile string)

func (*AppLogger) Sync

func (l *AppLogger) Sync()

func (*AppLogger) Warn

func (l *AppLogger) Warn(args ...interface{})

func (*AppLogger) Warnf

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

type Config

type Config struct {
	Name         string
	WriteFile    bool
	DebugMode    bool // 如果是debugmode error会输出堆栈信息
	FilePath     string
	LevelConsole string
	LevelFile    string
}

func ConfigMerge

func ConfigMerge(c, def *Config) *Config

Jump to

Keyboard shortcuts

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