loggerx

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Overview

*

  • @copyright 像衍科技-idr.ai
  • @author 牛牛-研发部-www.ruomm.com
  • @create 2024/1/19 16:38
  • @version 1.0

Index

Constants

This section is empty.

Variables

View Source
var Logger *zap.Logger

Functions

func ConfigCallerSkipHandler

func ConfigCallerSkipHandler(handler XCallerSkipHandler)

func Debug

func Debug(message string, fields ...zap.Field)

func Error

func Error(message string, fields ...zap.Field)

func Info

func Info(message string, fields ...zap.Field)

func InitLogger

func InitLogger(logConfig interface{}, callerSkipHandler XCallerSkipHandler) error

func Warn

func Warn(message string, fields ...zap.Field)

Types

type LogConfigs

type LogConfigs struct {
	Level        string `xref:"Level"`
	StdOut       bool   `xref:"StdOut"`
	MaxSize      int    `xref:"MaxSize"`
	MaxBackups   int    `xref:"MaxBackups"`
	MaxAges      int    `xref:"MaxAges"`
	Compress     bool   `xref:"Compress"`
	ServiceName  string `xref:"ServiceName"`
	InstanceName string `xref:"InstanceName"`
}

type XCallerSkipHandler

type XCallerSkipHandler func(file string, line int) int

Jump to

Keyboard shortcuts

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