ezlog

package module
v0.0.0-...-3eddf0a Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2021 License: MIT Imports: 3 Imported by: 0

README

ezlog

A log library based on golang

注意

此日志库仅在Linux下测试通过,暂时平台暂时未进行过测试。

说明

日志输出到屏幕

  • 支持不同等级的日志彩色输出到终端;

日志输出到文件

  • 支持自定义日志文件目录;
  • 支持自定义日志文件前缀;
  • 支持自定义是否按时间切分日志文件,和切分文件的周期;
  • 支持自定义是否按文件大小切分日志文件,和切分文件的大小;
  • 支持自定义是否删除过期日志文件,和过期时间;

通用特性

  • 支持日志条目显示文件,行号,时间,调用函数信息;
  • 支持自定义对日志进行按模块过滤收集;
  • 支持Debug、Info、Notice、Warn、Error、Critical六种等级日志,并且每个等级都支持日志开关过滤;

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Critical

func Critical(format string, v ...interface{})

Critical add a Critical screen log.

func CriticalJs

func CriticalJs(msg string, v ...interface{})

CriticalJs json格式输出Critical日志

func Criticalf

func Criticalf(format string, v ...interface{})

Criticalf add a Critical file log.

func CriticalfJs

func CriticalfJs(msg string, v ...interface{})

CriticalfJs json格式输出Critical日志

func Debug

func Debug(format string, v ...interface{})

Debug add a debug screen log.

func DebugJs

func DebugJs(msg string, v ...interface{})

DebugJs json格式输出Debug日志

func Debugf

func Debugf(format string, v ...interface{})

Debugf add a debug file log.

func DebugfJs

func DebugfJs(msg string, v ...interface{})

DebugfJs json格式输出Debug日志

func Error

func Error(format string, v ...interface{})

Error add a Error screen log.

func ErrorJs

func ErrorJs(msg string, v ...interface{})

ErrorJs json格式输出Error日志

func Errorf

func Errorf(format string, v ...interface{})

Errorf add a Error file log.

func ErrorfJs

func ErrorfJs(msg string, v ...interface{})

ErrorfJs json格式输出Error日志

func Info

func Info(format string, v ...interface{})

Info add a Info screen log.

func InfoJs

func InfoJs(msg string, v ...interface{})

InfoJs json格式输出Info日志

func Infof

func Infof(format string, v ...interface{})

Infof add a Info file log.

func InfofJs

func InfofJs(msg string, v ...interface{})

InfofJs json格式输出Info日志

func Init

func Init(config common.Config)

Init init file and screen log impl, otherwise will use default config.

func Notice

func Notice(format string, v ...interface{})

Notice add a Notice screen log.

func NoticeJs

func NoticeJs(msg string, v ...interface{})

NoticeJs json格式输出Notice日志

func Noticef

func Noticef(format string, v ...interface{})

Noticef add a Notice file log.

func NoticefJs

func NoticefJs(msg string, v ...interface{})

NoticefJs json格式输出Notice日志

func StartPipeServer

func StartPipeServer()

func Warn

func Warn(format string, v ...interface{})

Warn add a Warn screen log.

func WarnJs

func WarnJs(msg string, v ...interface{})

WarnJs json格式输出Warn日志

func Warnf

func Warnf(format string, v ...interface{})

Warnf add a Warn file log.

func WarnfJs

func WarnfJs(msg string, v ...interface{})

WarnfJs json格式输出Warn日志

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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