Documentation
¶
Index ¶
- Constants
- func New(file string, opts ...Option) (*zap.Logger, error)
- func ParseLevel(level string) zapcore.Level
- func ParseOutputType(outputType string) outputType
- func ParseRotationType(rotateType string) filerotator.RotateType
- type Option
- func AsyncWrite(asyncWrite bool) Option
- func BufferSize(bufferSize int) Option
- func Clock(clock filerotator.Clock) Option
- func FlushInterval(flushInterval time.Duration) Option
- func Level(level zapcore.Level) Option
- func MaxAge(maxAge time.Duration) Option
- func MaxBackups(maxBackups uint) Option
- func OutputType(outputType outputType) Option
- func RotateType(rotateType filerotator.RotateType) Option
- func RotationSize(rotationSize int64) Option
- func RotationTime(rotationTime time.Duration) Option
- func Symlink(symlink string) Option
- func ZapOpts(zapOpts ...zap.Option) Option
Constants ¶
View Source
const ( OutputType_None outputType = iota OutputType_Both OutputType_File OutputType_Console )
Variables ¶
This section is empty.
Functions ¶
func ParseLevel ¶
func ParseOutputType ¶
func ParseOutputType(outputType string) outputType
func ParseRotationType ¶
func ParseRotationType(rotateType string) filerotator.RotateType
Types ¶
type Option ¶
type Option func(*config)
func AsyncWrite ¶
func BufferSize ¶
func Clock ¶
func Clock(clock filerotator.Clock) Option
func FlushInterval ¶
func MaxBackups ¶
func OutputType ¶
func OutputType(outputType outputType) Option
func RotateType ¶
func RotateType(rotateType filerotator.RotateType) Option
func RotationSize ¶
func RotationTime ¶
Click to show internal directories.
Click to hide internal directories.