logs

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2021 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

*

  • @Time : 2020-04-26 19:57
  • @Author : MassAdobe
  • @Description: logs

*

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasicError

func BasicError(err interface{}) zap.Field

*

  • @Author: MassAdobe
  • @TIME: 2020-04-27 20:52
  • @Description: 全局处理错误封装

*

func Desc

func Desc(desc interface{}) zap.Field

*

  • @Author: MassAdobe
  • @TIME: 2020-04-26 21:04
  • @Description: 描述封装

*

func Error

func Error(err error) zap.Field

*

  • @Author: MassAdobe
  • @TIME: 2020-04-26 21:04
  • @Description: 错误封装

*

func InitLogger

func InitLogger(path, serveName, level string, port uint64)

*

  • @Author: MassAdobe
  • @TIME: 2020-04-26 21:05
  • @Description: gin自定义日志插件

*

func NewLogger

func NewLogger(filePath, level string, maxSize, maxBackups, maxAge int, compress bool, serviceName string)

*

  • @Author: MassAdobe
  • @TIME: 2020-04-26 21:03
  • @Description: 新建日志

*

func SpecDesc

func SpecDesc(name string, desc interface{}) zap.Field

*

  • @Author: MassAdobe
  • @TIME: 2020-04-26 21:05
  • @Description: 特殊日志封装

*

Types

type MyLog

type MyLog struct {
	ZapLog *zap.Logger
	Level  zap.AtomicLevel
}

*

  • @Author: MassAdobe
  • @TIME: 2020/12/17 6:17 下午
  • @Description: 日志对象

*

var (
	Lg MyLog
)

func (*MyLog) Debug

func (this *MyLog) Debug(msg string, contextAndFields ...interface{})

*

  • @Author: MassAdobe
  • @TIME: 2020/12/17 7:52 下午
  • @Description: 重写Debug日志级别输出

*

func (*MyLog) Error

func (this *MyLog) Error(msg string, err error, contextAndFields ...interface{})

*

  • @Author: MassAdobe
  • @TIME: 2020/12/17 7:52 下午
  • @Description: 重写Error日志级别输出

*

func (*MyLog) GlobalError

func (this *MyLog) GlobalError(msg string, contextAndFields ...interface{})

*

  • @Author: MassAdobe
  • @TIME: 2020/12/17 7:52 下午
  • @Description: 重写Global Error日志级别输出

*

func (*MyLog) Info

func (this *MyLog) Info(msg string, contextAndFields ...interface{})

*

  • @Author: MassAdobe
  • @TIME: 2020/12/17 7:52 下午
  • @Description: 重写Info日志级别输出

*

func (*MyLog) SysDebug added in v1.3.2

func (this *MyLog) SysDebug(msg string, contextAndFields ...interface{})

*

  • @Author: MassAdobe
  • @TIME: 2020/12/17 7:52 下午
  • @Description: 重写Debug日志级别输出(系统)

*

func (*MyLog) SysError added in v1.3.2

func (this *MyLog) SysError(msg string, err error, contextAndFields ...interface{})

*

  • @Author: MassAdobe
  • @TIME: 2020/12/17 7:52 下午
  • @Description: 重写Error日志级别输出(系统)

*

func (*MyLog) SysInfo added in v1.3.2

func (this *MyLog) SysInfo(msg string, contextAndFields ...interface{})

*

  • @Author: MassAdobe
  • @TIME: 2020/12/17 7:52 下午
  • @Description: 重写Info日志级别输出(系统)

*

Jump to

Keyboard shortcuts

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