exlog

package
v0.0.0-...-526f93f Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(o Option) (logger zerolog.Logger)

Init zerolog.Logger. Notice: it will override the default `zerolog/log.Logger`.

Types

type FileWriter

type FileWriter struct {
	Enable    bool   // Enable file writer. It will override stdout as default writer.
	Directory string // Output file path. Default is `/tmp/logs/`
	Filename  string // Output file name, it will append ext automaticlly. Default is `app`

	DisableCompress    bool   // Disable compress the trucked file.
	RollingTimePattern string // Rolling time pattern. Visit https://crontab.guru/ for more info. Default `0 0 * * *`
}

type Option

type Option struct {
	Level string // debug, info, warn, error, fatal. default: info
	File  FileWriter
}

Jump to

Keyboard shortcuts

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