elog

package module
v0.1.1-beta Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2023 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Elog

type Elog struct {
	Level  LogLevel
	Format LogFormat
	// contains filtered or unexported fields
}

func NewElog

func NewElog(logLevel LogLevel, core *core.Core) *Elog

NewElog 创建一个日志组件

func (*Elog) Close

func (el *Elog) Close()

Close 关闭日志组件

func (*Elog) Debug

func (el *Elog) Debug(format string, a ...any)

func (*Elog) Error

func (el *Elog) Error(format string, a ...any)

func (*Elog) Fatal

func (el *Elog) Fatal(format string, a ...any)

func (*Elog) Info

func (el *Elog) Info(format string, a ...any)

func (*Elog) Panic

func (el *Elog) Panic(format string, a ...any)

func (*Elog) Warn

func (el *Elog) Warn(format string, a ...any)

type LogFormat

type LogFormat byte
const (
	DefaultFormat LogFormat = 1 << iota
	JSONFormat
	CustomFormat
)

type LogLevel

type LogLevel byte
const (
	Debug LogLevel = 1 << iota
	Info
	Warn
	Error
	Fatal
	Panic
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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