handler

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsoleHandler

type ConsoleHandler struct {
	Handler
	sync.Mutex
	// contains filtered or unexported fields
}

func NewConsoleHandler

func NewConsoleHandler(level record.Level) *ConsoleHandler

func (*ConsoleHandler) Handle

func (h *ConsoleHandler) Handle(r record.Record) bool

Handle Handles a record.

func (*ConsoleHandler) IsHandling

func (h *ConsoleHandler) IsHandling(r record.Record) bool

IsHandling Checks whether the given record will be handled by this handler.

type FileHandler added in v0.2.0

type FileHandler struct {
	Handler
	sync.Mutex
	// contains filtered or unexported fields
}

func NewFileHandler added in v0.2.0

func NewFileHandler(filename string, level record.Level) *FileHandler

func (*FileHandler) GetTimedFilename added in v0.2.0

func (h *FileHandler) GetTimedFilename() string

GetTimedFilename Gets the Timed filename.

func (*FileHandler) Handle added in v0.2.0

func (h *FileHandler) Handle(r record.Record) bool

Handle Handles a record.

func (*FileHandler) IsHandling added in v0.2.0

func (h *FileHandler) IsHandling(r record.Record) bool

IsHandling Checks whether the given record will be handled by this handler.

func (*FileHandler) SetLevel added in v0.2.0

func (h *FileHandler) SetLevel(level record.Level)

SetLevel Sets minimum logging level at which this handler will be triggered.

type Handler added in v0.2.0

type Handler struct {
	// contains filtered or unexported fields
}

func (*Handler) GetFormatter added in v0.2.0

func (h *Handler) GetFormatter() formatter.Formatter

GetFormatter Gets the formatter.

func (*Handler) SetFormatter added in v0.2.0

func (h *Handler) SetFormatter(f formatter.Formatter) *Handler

SetFormatter Sets the formatter.

Jump to

Keyboard shortcuts

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