logger

package
v0.0.0-...-e08e63e Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_LOG_FILE   = "dingocli.log"
	DEFAULT_LOG_LEVEL  = "info"
	DEFAULT_LOG_FORMAT = "text"
)

Variables

This section is empty.

Functions

func Debug

func Debug(message string)

func Debugf

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

func Error

func Error(message string)

func Errorf

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

func Fatal

func Fatal(message string)

func Fatalf

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

func Info

func Info(message string)

func Infof

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

func Panic

func Panic(message string)

func Panicf

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

func Sync

func Sync() error

func Warn

func Warn(message string)

func Warnf

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

Types

type DingoLogger

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

func GetLogger

func GetLogger() *DingoLogger

func InitGlobalLogger

func InitGlobalLogger(opts ...Option) *DingoLogger

func (*DingoLogger) Debug

func (logger *DingoLogger) Debug(message string)

func (*DingoLogger) Debugf

func (logger *DingoLogger) Debugf(message string, args ...interface{})

func (*DingoLogger) Error

func (logger *DingoLogger) Error(message string)

func (*DingoLogger) Errorf

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

func (*DingoLogger) Fatal

func (logger *DingoLogger) Fatal(message string)

func (*DingoLogger) Fatalf

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

func (*DingoLogger) Info

func (logger *DingoLogger) Info(message string)

func (*DingoLogger) Infof

func (logger *DingoLogger) Infof(message string, args ...interface{})

func (*DingoLogger) Panic

func (logger *DingoLogger) Panic(message string)

func (*DingoLogger) Panicf

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

func (*DingoLogger) Sync

func (logger *DingoLogger) Sync() error

func (*DingoLogger) Warn

func (logger *DingoLogger) Warn(message string)

func (*DingoLogger) Warnf

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

type Option

type Option func(*logConfig)

func WithCompress

func WithCompress(compress bool) Option

func WithFormat

func WithFormat(format string) Option

func WithLogFile

func WithLogFile(logFile string) Option

func WithLogLevel

func WithLogLevel(logLevel string) Option

func WithMaxAge

func WithMaxAge(maxAge int) Option

func WithMaxBackups

func WithMaxBackups(maxBackups int) Option

func WithMaxSize

func WithMaxSize(maxSize int) Option

func WithStdout

func WithStdout(stdout bool) Option

Jump to

Keyboard shortcuts

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