xlog

package
v0.0.0-...-d8ff57e Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogLevel

type LogLevel string
const (
	DebugLogLevel LogLevel = "DEBUG"
	InfoLogLevel  LogLevel = "INFO"
	WarnLogLevel  LogLevel = "WARN"
	ErrorLogLevel LogLevel = "ERROR"
)

type XLog

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

XLog multiple level of logger.

func NewXLog

func NewXLog(dest string, level string, isStdout bool) (*XLog, error)

NewXLog create a logger based on config. Based on log/slog, level param affects the output level of the log.

func (*XLog) Debug

func (x *XLog) Debug(mgs string, arg ...any)

func (*XLog) Error

func (x *XLog) Error(mgs string, arg ...any)

func (*XLog) Info

func (x *XLog) Info(mgs string, arg ...any)

func (*XLog) Warn

func (x *XLog) Warn(mgs string, arg ...any)

Jump to

Keyboard shortcuts

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