xlog

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: MIT Imports: 13 Imported by: 12

Documentation

Overview

功能:日志相关 说明:

功能:日志便利封装 说明:

Index

Constants

View Source
const (
	TAG = "TAG"
)

Variables

Functions

func AddLocalFileHook

func AddLocalFileHook(dir, filename string, filterKey string, filterValues map[string]struct{}, level logrus.Level) (func(), error)

func AddMysqlHook

func AddMysqlHook(db *sql.DB, tableName string, extraItems []*mysql_hook.ExecExtraItem, filterKey string, filterValues map[string]struct{}, level logrus.Level) (func(), error)

func AddPromrusHook

func AddPromrusHook(name, help string, labels []string, filterKey string, filterValues map[string]struct{}, level logrus.Level) (func(), error)

addr like ":8080",只支持counter

func Init_logrus

func Init_logrus(filename string)

初始化logrus

func Level2Levels

func Level2Levels(level logrus.Level) []logrus.Level

func New_entry

func New_entry(format string, a ...string) *logrus.Entry

func New_entry_chat_id

func New_entry_chat_id(tag string, chat_id int64) *logrus.Entry

func New_entry_tag

func New_entry_tag(tags ...string) *logrus.Entry

func Set_level

func Set_level()

设置日志等级

func StandardLogger

func StandardLogger() *logrus.Logger

Types

This section is empty.

Directories

Path Synopsis
功能: 说明: https://juejin.cn/post/6844903549881909256 logrus默认是没有像logrotate那样的日志切割功能
功能: 说明: https://juejin.cn/post/6844903549881909256 logrus默认是没有像logrotate那样的日志切割功能

Jump to

Keyboard shortcuts

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