Documentation ¶
Overview ¶
功能:日志相关 说明:
功能:日志便利封装 说明:
Index ¶
- Constants
- Variables
- func AddLocalFileHook(dir, filename string, filterKey string, filterValues map[string]struct{}, ...) (func(), error)
- func AddMysqlHook(db *sql.DB, tableName string, extraItems []*mysql_hook.ExecExtraItem, ...) (func(), error)
- func AddPromrusHook(name, help string, labels []string, filterKey string, ...) (func(), error)
- func Init_logrus(filename string)
- func Level2Levels(level logrus.Level) []logrus.Level
- func New_entry(format string, a ...string) *logrus.Entry
- func New_entry_chat_id(tag string, chat_id int64) *logrus.Entry
- func New_entry_tag(tags ...string) *logrus.Entry
- func Set_level()
- func StandardLogger() *logrus.Logger
Constants ¶
View Source
const (
TAG = "TAG"
)
Variables ¶
View Source
var AllLevels = []logrus.Level{logrus.TraceLevel, logrus.DebugLevel, logrus.InfoLevel, logrus.WarnLevel, logrus.ErrorLevel, logrus.FatalLevel, logrus.PanicLevel}
Functions ¶
func AddLocalFileHook ¶
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 New_entry_tag ¶
func StandardLogger ¶
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
功能: 说明: https://juejin.cn/post/6844903549881909256 logrus默认是没有像logrotate那样的日志切割功能
|
功能: 说明: https://juejin.cn/post/6844903549881909256 logrus默认是没有像logrotate那样的日志切割功能 |
Click to show internal directories.
Click to hide internal directories.