part

package
v0.28.20240101151147 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: MIT Imports: 11 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	On = struct{}{}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	To     time.Duration
	File   string
	DBConn *sql.DB

	// $1:Prefix $2:Base $2:Msgs
	DBInsert string
	Stdout   bool

	Prefix_string map[string]struct{}
	Base_string   []any
}

type Log_interface

type Log_interface struct {
	MQ *m.MsgType[Msg_item]
	Config
}

func Copy

func Copy(i *Log_interface) (o *Log_interface)

func New

func New(c Config) (o *Log_interface)

New 初始化

func (*Log_interface) Base

func (I *Log_interface) Base(i ...any) (O *Log_interface)

日志等级 Base 追加到后续输出

func (*Log_interface) Base_add

func (I *Log_interface) Base_add(i ...any) (O *Log_interface)

func (*Log_interface) Close added in v0.27.0

func (I *Log_interface) Close()

func (*Log_interface) Debug added in v0.28.20231209062226

func (I *Log_interface) Debug(msg string, args ...any)

func (*Log_interface) Error added in v0.28.20231209062226

func (I *Log_interface) Error(msg string, args ...any)

func (*Log_interface) Info added in v0.28.20231209062226

func (I *Log_interface) Info(msg string, args ...any)

func (*Log_interface) L

func (I *Log_interface) L(prefix string, i ...any) (O *Log_interface)

func (*Log_interface) LDB added in v0.28.1

func (I *Log_interface) LDB(db *sql.DB, insert string) (O *Log_interface)

Open 日志输出至DB

func (*Log_interface) LFile added in v0.27.0

func (I *Log_interface) LFile(fileP string) (O *Log_interface)

func (*Log_interface) LShow added in v0.27.0

func (I *Log_interface) LShow(show bool) (O *Log_interface)

func (*Log_interface) Level

func (I *Log_interface) Level(log map[string]struct{}) (O *Log_interface)

Level 设置之后日志等级

func (*Log_interface) Log_show_control

func (I *Log_interface) Log_show_control(show bool) (O *Log_interface)

Open 日志不显示

func (*Log_interface) Log_to_file

func (I *Log_interface) Log_to_file(fileP string) (O *Log_interface)

Open 日志输出至文件

func (*Log_interface) Warn added in v0.28.20231209062226

func (I *Log_interface) Warn(msg string, args ...any)

type Msg_item

type Msg_item struct {
	Prefix string
	Msgs   []any
	Config
}

Jump to

Keyboard shortcuts

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