logging

package
v0.0.0-...-a531e67 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// LogSavePath 文件保存路径
	LogSavePath = "runtime/logs/"
	// LogSaveName 文件保存名称
	LogSaveName = "log"
	// LogFileExt 文件后缀名
	LogFileExt = "log"
	// TimeFormat 时间格式化形式
	TimeFormat = "20060102" // "20200424" -> 这种形式出来的日期格式不对
)
View Source
var (
	// F 文件句柄
	F *os.File

	// DefaultPrefix 默认前缀
	DefaultPrefix = ""
	// DefaultCallerDepth 默认层级
	DefaultCallerDepth = 2
)

Functions

func Debug

func Debug(v ...interface{})

Debug 开发

func Error

func Error(v ...interface{})

Error 错误

func Fatal

func Fatal(v ...interface{})

Fatal 重要错误

func Info

func Info(v ...interface{})

Info 提醒

func Warn

func Warn(v ...interface{})

Warn 警告

Types

type Level

type Level int

Level 自定义级别变量

const (
	// DEBUG 开发
	DEBUG Level = iota
	// INFO 提醒
	INFO
	// WARNING 警告
	WARNING
	// ERROR 错误
	ERROR
	// FATAL 致命的错误
	FATAL
)

Jump to

Keyboard shortcuts

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