logKit

package
v3.1.112 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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 NewLogger

func NewLogger(out io.Writer, prefix string, flag int) *log.Logger

NewLogger

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

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