loger

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	F                  *os.File
	DefaultPrefix      = ""
	DefaultCallerDepth = 2
)

Functions

func LogSetup

func LogSetup()

日志初始化

Types

type Level

type Level int

定义一个int的别名

const (
	DEBUG Level = iota
	INFO
	WARN
	ERROR
	FATAL
)

iota在const关键字出现时将被重置为0(const内部的第一行之前),const中每新增一行常量声明将使iota计数一次(iota可理解为const语句块中的行索引)。

type OLog

type OLog interface {
	Debug(v ...interface{})
	Info(v ...interface{})
	Warn(v ...interface{})
	Error(v ...interface{})
	Fatal(v ...interface{})
	Path() string
}

func NewOLoger

func NewOLoger() OLog

Jump to

Keyboard shortcuts

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