simple

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2021 License: Apache-2.0 Imports: 11 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) 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) Criticalf

func (self *Logger) Criticalf(format string, values ...interface{})

func (*Logger) Debug

func (self *Logger) Debug(message string)

func (*Logger) Debugf

func (self *Logger) Debugf(format string, values ...interface{})

func (*Logger) Error

func (self *Logger) Error(message string)

func (*Logger) Errorf

func (self *Logger) Errorf(format string, values ...interface{})

func (*Logger) Info

func (self *Logger) Info(message string)

func (*Logger) Infof

func (self *Logger) Infof(format string, values ...interface{})

func (*Logger) Notice

func (self *Logger) Notice(message string)

func (*Logger) Noticef

func (self *Logger) Noticef(format string, values ...interface{})

func (*Logger) Warning

func (self *Logger) Warning(message string)

func (*Logger) Warningf

func (self *Logger) Warningf(format string, values ...interface{})

func (*Logger) Write

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

func (*Logger) Writef

func (self *Logger) Writef(level logging.Level, format string, values ...interface{})

Jump to

Keyboard shortcuts

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