handlers

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Standard Out Logger

Base logging handler

Standard Out Logger

Index

Constants

View Source
const (
	FATAL_LOG_LEVEL = iota
	ERROR_LOG_LEVEL
	WARNING_LOG_LEVEL
	INFO_LOG_LEVEL
	DEBUG_LOG_LEVEL
	TRACE_LOG_LEVEL
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AbstractHandler

type AbstractHandler struct {
	Level int
	Name  string
}

func (*AbstractHandler) Log

func (h *AbstractHandler) Log(message string, err error) error

type FallbackHandler

type FallbackHandler struct{}

func (*FallbackHandler) Handle

func (h *FallbackHandler) Handle(message string) error

func (*FallbackHandler) Log

func (h *FallbackHandler) Log(message string) error

type FileHandler

type FileHandler struct {
	Path string
	Mode fs.FileMode
}

func (*FileHandler) Handle

func (h *FileHandler) Handle(message string) error

func (*FileHandler) Init

func (h *FileHandler) Init() error

type Handled

type Handled struct {
	HandlerError error
}

func (*Handled) ReturnWithInt

func (h *Handled) ReturnWithInt() int

type Handler

type Handler interface {
	Init() error
	Handle(string) error
}

type StdoutHandler

type StdoutHandler struct{}

func (*StdoutHandler) Handle

func (h *StdoutHandler) Handle(message string) error

func (*StdoutHandler) Init

func (h *StdoutHandler) Init() error

Jump to

Keyboard shortcuts

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