logging

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LogFileMaxSize 日志文件最大100M
	LogFileMaxSize     = 100 * 1024 * 1024
	LogFileMaintainDay = 7
)
View Source
const (
	Info logLevel = iota
	Warn
	Error
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AsyncLogger

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

func GetLogger

func GetLogger() *AsyncLogger

func (*AsyncLogger) Error

func (l *AsyncLogger) Error(format string, args ...any)

func (*AsyncLogger) Info

func (l *AsyncLogger) Info(format string, args ...any)

func (*AsyncLogger) InfoKV

func (l *AsyncLogger) InfoKV(s *Schema)

func (*AsyncLogger) Warn

func (l *AsyncLogger) Warn(format string, args ...any)

type KVItem

type KVItem interface {
	// contains filtered or unexported methods
}

type Schema

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

func Code

func Code(c string) *Schema

func Empty

func Empty() *Schema

func (*Schema) Bool

func (s *Schema) Bool(key string, ok bool) *Schema

func (*Schema) Build

func (s *Schema) Build() []byte

func (*Schema) Int

func (s *Schema) Int(key string, val int) *Schema

func (*Schema) Recycle

func (s *Schema) Recycle()

func (*Schema) Str

func (s *Schema) Str(key string, val string) *Schema

Jump to

Keyboard shortcuts

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