simple

package
v0.1.68 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2023 License: Apache-2.0 Imports: 7 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, id []string, level logging.Level, colorize bool) string

FormatFunc signature

func FormatColorize added in v0.1.59

func FormatColorize(s string, level logging.Level) string

func FormatID added in v0.1.59

func FormatID(writer io.StringWriter, id []string)

func FormatLevel added in v0.1.59

func FormatLevel(writer io.StringWriter, level logging.Level, align bool)

func FormatTime added in v0.1.59

func FormatTime(writer io.StringWriter)

Types

type Backend

type Backend struct {
	Writer   io.Writer
	Format   FormatFunc
	Buffered bool
	// contains filtered or unexported fields
}

func NewBackend

func NewBackend() *Backend

func (*Backend) AllowLevel added in v0.1.53

func (self *Backend) AllowLevel(name []string, level logging.Level) bool

logging.Backend interface

func (*Backend) Configure

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

logging.Backend interface

func (*Backend) GetMaxLevel

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

logging.Backend interface

func (*Backend) GetWriter added in v0.1.22

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

logging.Backend interface

func (*Backend) NewMessage added in v0.1.53

func (self *Backend) NewMessage(name []string, level logging.Level, depth int) logging.Message

logging.Backend interface

func (*Backend) SetMaxLevel

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

logging.Backend interface

type FormatFunc

type FormatFunc func(message string, id []string, level logging.Level, colorize bool) string

Jump to

Keyboard shortcuts

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