cls

package
v0.0.0-...-eaae570 Latest Latest
Warning

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

Go to latest
Published: May 15, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LevelDebug = iota
	LevelInfo
	LevelWarn
	LevelError
)

Log level constants

Variables

This section is empty.

Functions

func GetEnvBool

func GetEnvBool(key string, defaultValue bool) bool

func GetEnvFloat

func GetEnvFloat(key string, defaultValue float64) float64

func GetEnvInt

func GetEnvInt(key string, defaultValue int) int

func GetEnvString

func GetEnvString(key, defaultValue string) string

Types

type CLS

type CLS struct {
}

func (*CLS) FlushAndLoadEnv

func (c *CLS) FlushAndLoadEnv(filenames ...string) error

type Logger

type Logger interface {
	Info(format string, v ...interface{})
	Warn(format string, v ...interface{})
	Error(format string, v ...interface{})
	Debug(format string, v ...interface{})
}

type XLogger

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

สร้าง LineLogger struct

func NewLogger

func NewLogger(logname, logFilePath string) (*XLogger, error)

func (*XLogger) Debug

func (l *XLogger) Debug(format string, v ...interface{})

func (*XLogger) Error

func (l *XLogger) Error(format string, v ...interface{})

func (*XLogger) Info

func (l *XLogger) Info(format string, v ...interface{})

func (*XLogger) Warn

func (l *XLogger) Warn(format string, v ...interface{})

Jump to

Keyboard shortcuts

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