rotate

package
v0.0.0-...-316faa8 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(debugLevel bool, options ...Option) core.Logger

New 创建一个新的rotate file logger

Types

type Config

type Config struct {
	Directory string
	Filename  string

	// MaxSize the max size in MB of the logfile before it's rolled
	MaxSize int

	// MaxBackups the max number of rolled files to keep
	MaxBackups int

	// MaxAge the max age in days to keep a logfile
	MaxAge int

	// Compress determines if the rotated log files should be compressed
	Compress bool
}

Config is Configuration for logging

type Option

type Option func(*Config)

Option 是rotate logger的配置函数

Jump to

Keyboard shortcuts

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