logger

package
v0.0.0-...-3a44c62 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JsonFormat = true                 // 日志保存格式是否采用json类型
	Filename   = "log/cct-spider.log" // 日志保存路径
	MaxSize    = 100                  // 每个日志文件保存几M,默认100M
	MaxBackups = 30                   // 保留多少个备份,默认不限
	MaxAge     = 0                    // 保留多少天,默认不限
	Compress   = false                // 是否压缩,默认不压缩
)

Variables

This section is empty.

Functions

func DPanic

func DPanic(msg string, fields ...zap.Field)

func Debug

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

func Error

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

func Fatal

func Fatal(msg string, fields ...zap.Field)

func Field

func Field(key string, val interface{}) zap.Field

func Info

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

func Panic

func Panic(msg string, fields ...zap.Field)

func SetLevel

func SetLevel(level string)

func Warn

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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