saLog

package
v0.0.0-...-b2602dc Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: Apache-2.0 Imports: 10 Imported by: 9

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 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