simple

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2023 License: Apache-2.0 Imports: 7 Imported by: 68 modules, 80 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 commonlog.Level, colorize bool) string

FormatFunc signature

func FormatColorize

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

func FormatID

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

func FormatLevel

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

func FormatTime

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

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

commonlog.Backend interface

func (*Backend) Configure

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

commonlog.Backend interface

func (*Backend) GetMaxLevel

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

commonlog.Backend interface

func (*Backend) GetWriter

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

commonlog.Backend interface

func (*Backend) NewMessage

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

commonlog.Backend interface

func (*Backend) SetMaxLevel

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

commonlog.Backend interface

type FormatFunc

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

Jump to

Keyboard shortcuts

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