core

package
v0.0.0-...-316faa8 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2018 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Level

type Level int8

Level 表示日志的等级

const (
	// Debug 为调试级
	Debug Level = iota - 1

	// Info 是默认的日志等级
	Info

	// Warn 为警告级
	Warn

	// Error 为错误级
	Error

	// Panic 等级在日志记录后会触发panic
	Panic

	// Fatal 等级在日志记录后会调用os.Exit(1)
	Fatal
)

type Logger

type Logger interface {
	Log(level Level, v ...interface{})
	Logf(level Level, format string, args ...interface{})
	Logln(level Level, v ...interface{})
	With(key string, value interface{}) Logger
	Sync() error
}

Logger 日志器接口

Jump to

Keyboard shortcuts

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