rollinglog

package
v0.0.0-...-db98cbe Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KZapLogger2

type KZapLogger2 struct {
	// contains filtered or unexported fields
}

func New

func New(opts *Options, kv ...interface{}) *KZapLogger2

func (KZapLogger2) GetLogger

func (l KZapLogger2) GetLogger() log.Logger

func (*KZapLogger2) Sync

func (l *KZapLogger2) Sync()

type Options

type Options struct {
	OutputPaths      []string `json:"output-paths"       mapstructure:"output-paths"`
	ErrorOutputPaths []string `json:"error-output-paths" mapstructure:"error-output-paths"`
	Level            string   `json:"level"              mapstructure:"level"`
	Format           string   `json:"format"             mapstructure:"format"`
	DisableCaller    bool     `json:"disable-caller"     mapstructure:"disable-caller"`
	EnableColor      bool     `json:"enable-color"       mapstructure:"enable-color"`
	Development      bool     `json:"development"        mapstructure:"development"`
	Name             string   `json:"name"               mapstructure:"name"`

	Rolling           bool `json:"rolling" mapstructure:"rolling"`
	RollingMaxSize    int  `json:"rolling-max-size" mapstructure:"rolling-max-size"`
	RollingMaxAge     int  `json:"rolling-max-age" mapstructure:"rolling-max-age"`
	RollingMaxBackups int  `json:"rolling-max-backups" mapstructure:"rolling-max-backups"`
	RollingLocalTime  bool `json:"rolling-local-time" mapstructure:"rolling-local-time"`
	RollingCompress   bool `json:"rolling-compress" mapstructure:"rolling-compress"`
}

func NewOptions

func NewOptions() *Options

NewOptions creates an Options object with default parameters.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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