loglv

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2022 License: LGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package loglv 日志打印功能对外接口 若需要其他文件名字的日志文件,支持复刻本文件到其他package中...

Index

Constants

This section is empty.

Variables

View Source
var Dbg = logger.MakeDbg(std) //DEBUG

Dbg DEBUG日志

View Source
var Err = logger.MakeErr(std) //ERROR

Err ERROR日志

View Source
var Fta = logger.MakeFta(std) //FATAL

Fta FATAL日志

View Source
var Inf = logger.MakeInf(std) //INFO

Inf INFO日志

View Source
var War = logger.MakeWar(std) //WARN

War WARN日志

Functions

func Fatal

func Fatal(v ...any)

Fatal is equivalent to Print() followed by a call to os.Exit(1).

func Fatalf

func Fatalf(format string, v ...any)

Fatalf is equivalent to Printf() followed by a call to os.Exit(1).

func Fatalln

func Fatalln(v ...any)

Fatalln is equivalent to Println() followed by a call to os.Exit(1).

func InitLOG

func InitLOG(isdaemon bool)

func InitSet

func InitSet(getlogdir func() string,
	getexebasename func() string,
	cmdparmlike func(leftpart string) string,
	searchfile func(plist_file *[]os.FileInfo, dirname string, name_pattern string) ([]os.FileInfo, error),
)

func Panic

func Panic(v ...any)

Panic is equivalent to Print() followed by a call to panic().

func Panicf

func Panicf(format string, v ...any)

Panicf is equivalent to Printf() followed by a call to panic().

func Panicln

func Panicln(v ...any)

Panicln is equivalent to Println() followed by a call to panic().

func SetLOGprintLEVL

func SetLOGprintLEVL(newloglv logger.LOGlevl) (curlv logger.LOGlevl)

func SetLOGprintLEVLi

func SetLOGprintLEVLi(newlevl int)

func SetOutput

func SetOutput(bakName, newName string, w io.Writer) error

SetOutput sets the output destination for the standard logger. 现有日志文件会自动更名备份为bakName,如果bakName为空,会自动产生一时间标记的唯一文件名; w只有在newName为""的时候才会生效

Types

This section is empty.

Directories

Path Synopsis
Package log implements a simple logging package.
Package log implements a simple logging package.

Jump to

Keyboard shortcuts

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