Documentation
¶
Index ¶
- Constants
- func DefaultFormat(message *commonlog.UnstructuredMessage, name []string, level commonlog.Level, ...) string
- func FormatColorize(s string, level commonlog.Level) string
- func FormatLevel(writer *strings.Builder, level commonlog.Level, align bool)
- func FormatName(builder *strings.Builder, name []string)
- func FormatTime(builder *strings.Builder)
- type Backend
- func (self *Backend) AllowLevel(level commonlog.Level, name ...string) bool
- func (self *Backend) Configure(verbosity int, path *string)
- func (self *Backend) GetMaxLevel(name ...string) commonlog.Level
- func (self *Backend) GetWriter() io.Writer
- func (self *Backend) NewMessage(level commonlog.Level, depth int, name ...string) commonlog.Message
- func (self *Backend) SetMaxLevel(level commonlog.Level, name ...string)
- type FormatFunc
Constants ¶
View Source
const ( LOG_FILE_WRITE_PERMISSIONS = 0600 DEFAULT_BUFFER_SIZE = 1_000 )
View Source
const TIME_FORMAT = "2006/01/02 15:04:05.000"
Variables ¶
This section is empty.
Functions ¶
func DefaultFormat ¶
func DefaultFormat(message *commonlog.UnstructuredMessage, name []string, level commonlog.Level, colorize bool) string
(FormatFunc signature)
func FormatName ¶ added in v0.2.8
func FormatTime ¶
Types ¶
type Backend ¶
type Backend struct { Writer io.Writer Format FormatFunc BufferSize int Buffered bool // contains filtered or unexported fields }
func NewBackend ¶
func NewBackend() *Backend
func (*Backend) AllowLevel ¶
(commonlog.Backend interface)
func (*Backend) Configure ¶
(commonlog.Backend interface)
func (*Backend) GetMaxLevel ¶
(commonlog.Backend interface)
func (*Backend) GetWriter ¶
(commonlog.Backend interface)
func (*Backend) NewMessage ¶
(commonlog.Backend interface)
func (*Backend) SetMaxLevel ¶
(commonlog.Backend interface)
type FormatFunc ¶
Click to show internal directories.
Click to hide internal directories.