setup

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger added in v1.1.1

type Logger struct {
	*logrus.Logger
	// contains filtered or unexported fields
}

func New

func New(opt *Options) (*Logger, error)

func (*Logger) Close added in v1.1.1

func (l *Logger) Close() error

Close ALL internal file writer handle

type Options

type Options struct {
	BaseDir string

	Level          logrus.Level
	ReportCaller   bool
	LogFilePrefix  string
	RotateDuration time.Duration
	// ExtLoggerWriter write to other output, like os.Stdout in dev. Default write to logFile
	ExtLoggerWriter  []io.Writer
	CustomTimeLayout string
}

Options logger setup options, BaseDir is requirement, RewriteDuration default 7 days

Jump to

Keyboard shortcuts

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