logksam

package
v0.0.0-...-0708733 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogAttribute

type LogAttribute struct {
	FilePrefixName string
}

func (*LogAttribute) Close

func (l *LogAttribute) Close()

func (*LogAttribute) Err

func (l *LogAttribute) Err(a ...any)

func (*LogAttribute) Info

func (l *LogAttribute) Info(a ...any)

func (*LogAttribute) Init

func (l *LogAttribute) Init() bool

Init 初始化日志

func (*LogAttribute) Warn

func (l *LogAttribute) Warn(a ...any)

type LogContrl

type LogContrl interface {
	Init() bool    // Init 初始化日志
	Info(a ...any) // Init 正常日志
	Err(a ...any)  // Init 错误日志
	Warn(a ...any) // Init 警告日志
	Close()        // Init 关闭日志 一般用延迟关闭 defer logs.Close()
}

LogContrl @Example

 var logs logksam.LogContrl = &logksam.LogAttribute{FilePrefixName: "log"}
	logs.Init()                         初始化
	defer logs.Close()                  关闭
	logs.Info("我爱你", "\t", "你知道吗")  正常信息
	logs.Err("我爱你", "\t", "你知道吗")   错误信息
	logs.Warn("我爱你", "\t", "你知道吗")  警告信息

Jump to

Keyboard shortcuts

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