saLog

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: MIT Imports: 12 Imported by: 44

README

saLog

介绍

本地日志

  • 有info、warn、err三个等级
  • 日志较多时,自动从info -> warn -> err降级
  • 日志打印通过chan实现
  • 目前支持fmt、zap工具

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, t LogType)

func Log

func Log(a ...interface{})

func SetLogLevel

func SetLogLevel(l LogLevel)

func SetPkg

func SetPkg(pkgPath string, ignore ...string)

func SetRemoteUrl

func SetRemoteUrl(url string)

func Warn

func Warn(a ...interface{})

Types

type LogLevel

type LogLevel int8
const (
	NullLevel LogLevel = iota
	InfoLevel
	WarnLevel
	ErrorLevel
)

type LogType

type LogType int8
const (
	NullType LogType = iota
	LocalType
	ZapType
)

Jump to

Keyboard shortcuts

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