logKit

package
v3.0.909 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewLogger func(out io.Writer, prefix string, flag int) *log.Logger = log.New

NewLogger

@param flag e.g. os.O_CREATE|os.O_WRONLY|os.O_APPEND

Functions

func NewFileLogger

func NewFileLogger(filePath, prefix string, perm os.FileMode) (*log.Logger, error)

NewFileLogger

@param logPath (1) 文件不存在,会生成文件和父目录;

(2) 文件存在,新的内容会 append.

@param prefix e.g. "[TEST] " @param perm e.g. 0666 || 0644

func NewStdoutLogger added in v3.0.106

func NewStdoutLogger(prefix string) *log.Logger

NewStdoutLogger 输出到控制台(os.Stdout).

Types

This section is empty.

Jump to

Keyboard shortcuts

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