zerolog

package
v1.0.63 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: MPL-2.0 Imports: 15 Imported by: 1

Documentation

Overview

Package zerolog @Title log capability of zerolog @Description zerolog implementation of log capability @Author Ryan Fan 2021-06-09 @Update Ryan Fan 2021-06-09

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigLog

type ConfigLog struct {
	Rotate   *RotateLogConf `mapstructure:"rotate"`   // 日志文件截断的设置
	Filename string         `mapstructure:"filename"` // 日志文件名
	Level    string         `mapstructure:"level"`    // 默认日志级别
}

type RotateLogConf

type RotateLogConf struct {
	MaxAge       int    `mapstructure:"max_age"`
	RotationTime int    `mapstructure:"rotation_time"`
	Dirname      string `mapstructure:"dirname"` // 日志文件的保存目录名
	BaseDir      string `mapstructure:"basedir"` // 在linux环境下日志实际保存在<basedir>/<app>/<dirname>中,然后以link的方式创建dirname
}

type ZerologProvider

type ZerologProvider struct{}

func (*ZerologProvider) Debug

func (c *ZerologProvider) Debug(msg string, keyvals ...interface{})

func (*ZerologProvider) Error

func (c *ZerologProvider) Error(msg string, keyvals ...interface{})

func (*ZerologProvider) Fatal

func (c *ZerologProvider) Fatal(msg string, keyvals ...interface{})

func (*ZerologProvider) GetStdLogger

func (c *ZerologProvider) GetStdLogger() *stdlog.Logger

func (*ZerologProvider) Info

func (c *ZerologProvider) Info(msg string, keyvals ...interface{})

func (*ZerologProvider) Init

func (c *ZerologProvider) Init(rootConfiger types.Configer, logger types.LogProvider, args ...interface{}) error

Init implements types.Provider interface, used to initialize the capability @author Ryan Fan (2021-06-09) @param baseconf.Configer root config interface to extract config info @return error

func (*ZerologProvider) Log

func (c *ZerologProvider) Log(keyvals ...interface{}) error

func (*ZerologProvider) Panic

func (c *ZerologProvider) Panic(msg string, keyvals ...interface{})

func (*ZerologProvider) Trace

func (c *ZerologProvider) Trace(msg string, keyvals ...interface{})

func (*ZerologProvider) Warn

func (c *ZerologProvider) Warn(msg string, keyvals ...interface{})

Jump to

Keyboard shortcuts

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