simple

package
v0.1.35 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const BUFFER_SIZE = 10000
View Source
const LOG_FILE_WRITE_PERMISSIONS = 0600
View Source
const TIME_FORMAT = "2006/01/02 15:04:05.000"

Variables

This section is empty.

Functions

func DefaultFormat

func DefaultFormat(message string, name string, level logging.Level, colorize bool) string

FormatFunc signature

Types

type Backend

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

func NewBackend

func NewBackend() *Backend

func (*Backend) Allowed

func (self *Backend) Allowed(name string, level logging.Level) bool

func (*Backend) Configure

func (self *Backend) Configure(verbosity int, path *string)

func (*Backend) GetLogger

func (self *Backend) GetLogger(name string) logging.Logger

func (*Backend) GetMaxLevel

func (self *Backend) GetMaxLevel(name string) logging.Level

func (*Backend) GetWriter added in v0.1.22

func (self *Backend) GetWriter() io.Writer

func (*Backend) SetBuffered

func (self *Backend) SetBuffered(buffered bool)

func (*Backend) SetFormat

func (self *Backend) SetFormat(format FormatFunc)

func (*Backend) SetMaxLevel

func (self *Backend) SetMaxLevel(name string, level logging.Level)

type FormatFunc

type FormatFunc func(message string, name string, level logging.Level, colorize bool) string

type Logger

type Logger struct {
	Backend *Backend
	Name    string
}

func (Logger) Critical

func (self Logger) Critical(message string)

func (Logger) Debug

func (self Logger) Debug(message string)

func (Logger) Error

func (self Logger) Error(message string)

func (Logger) Info

func (self Logger) Info(message string)

func (Logger) Notice

func (self Logger) Notice(message string)

func (Logger) Warning

func (self Logger) Warning(message string)

func (Logger) Write

func (self Logger) Write(level logging.Level, message string)

Jump to

Keyboard shortcuts

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