saLog

package module
v0.0.0-...-16387e6 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

README

saLog

介绍

本地日志

  • 有info、warn、err三个等级
  • 日志较多时,自动从info -> err降级
  • 日志打印通过chan实现,避免抢占日志文件
  • Err接口,会打印调用文件及行数
待实现
  • 日志分文件处理

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Err

func Err(a ...interface{})

func Info

func Info(a ...interface{})

func Init

func Init(l LogLevel, f PrintFunc)

func Log

func Log(a ...interface{})

func Warn

func Warn(a ...interface{})

Types

type LogLevel

type LogLevel int
const (
	NullLevel LogLevel = iota
	InfoLevel
	WarnLevel
	ErrorLevel
)
var Level LogLevel = ErrorLevel

type PrintFunc

type PrintFunc func(string)

Jump to

Keyboard shortcuts

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