Documentation
¶
Index ¶
- Constants
- func New(file string, opts ...Option) (*logger, error)
- type Option
- func WithAsyncWrite(asyncWrite bool) Option
- func WithBufferSize(bufferSize int) Option
- func WithClock(clock filerotator.Clock) Option
- func WithFlushInterval(flushInterval time.Duration) Option
- func WithMaxAge(maxAge time.Duration) Option
- func WithMaxBackups(maxBackups uint) Option
- func WithOutputType(outputType OutputType) Option
- func WithRotateType(rotateType filerotator.RotateType) Option
- func WithRotationSize(rotationSize int64) Option
- func WithRotationTime(rotationTime time.Duration) Option
- func WithSymlink(file string) Option
- type OutputType
Constants ¶
View Source
const ( DebugLevel = zapcore.DebugLevel InfoLevel = zapcore.InfoLevel WarnLevel = zapcore.WarnLevel ErrorLevel = zapcore.ErrorLevel DPanicLevel = zapcore.DPanicLevel PanicLevel = zapcore.PanicLevel FatalLevel = zapcore.FatalLevel )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(*logger)
func WithAsyncWrite ¶
func WithBufferSize ¶
func WithClock ¶
func WithClock(clock filerotator.Clock) Option
func WithFlushInterval ¶
func WithMaxAge ¶
func WithMaxBackups ¶
func WithOutputType ¶
func WithOutputType(outputType OutputType) Option
func WithRotateType ¶
func WithRotateType(rotateType filerotator.RotateType) Option
func WithRotationSize ¶
func WithRotationTime ¶
func WithSymlink ¶
type OutputType ¶
type OutputType int
const ( OutputNone OutputType = iota OutputFile OutputConsole OutputBoth )
Click to show internal directories.
Click to hide internal directories.