file

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithFormatter

func WithFormatter(formatter monolog.Formatter) monolog.HandlerOpt

func WithLevel

func WithLevel(level logger.Level) monolog.HandlerOpt

Types

type Handler

type Handler struct {
	*monolog.Handlerable
	// contains filtered or unexported fields
}

Handler is a file handler. Because of the frequent opening and closing of file handles, the performance is not good. stream handler is recommended. PS: Although its performance is not good, its concurrency in seconds is enough for most uses, on my machine it was about 117832, and the request time per log was 8775 ns.

func NewHandler

func NewHandler(filename string, opts ...monolog.HandlerOpt) *Handler

func (*Handler) Close added in v0.6.0

func (h *Handler) Close() error

func (*Handler) Handle

func (h *Handler) Handle(record *monolog.Record) bool

Jump to

Keyboard shortcuts

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