logger

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2020 License: Apache-2.0 Imports: 8 Imported by: 3

README

Usage

go get -u github.com/ysicing/logger

Documentation

Index

Constants

View Source
const (
	DefaultMaxSize  = 10 // MB
	DefaultBackups  = 3
	DefaultMaxAge   = 7 // days
	DefaultCompress = true
)

Variables

View Source
var (
	Log  *zap.Logger
	Slog *zap.SugaredLogger
)

Functions

func Exit

func Exit(msg interface{})

func Exitf added in v0.0.3

func Exitf(template string, fmtArgs ...interface{})

func InitLogger

func InitLogger(cfg *LogConfig)

Types

type LogConfig

type LogConfig struct {
	Simple     bool
	HookFunc   func(zapcore.Entry) error
	JsonFormat bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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