Discover Packages
github.com/fufuok/gxlog
iface
package
Version:
v1.0.100
Opens a new window with list of versions in this module.
Published: Aug 5, 2021
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
Documentation
Documentation
¶
LevelCount is the total count of available levels except for Off.
An Auxiliary is a set of extra attributes that are associated with a log.
A Context is a pair of key-value that is associated with a log.
type Formatter interface {
Format(record *Record ) []byte
}
Formatter is the interface that a formatter of a Logger needs to implement.
A Formatter must NOT modify the record. In case of asynchrony, a Formatter
needs to make and return a new byte slice each time.
Do NOT call any method of the Logger within Format, or it may deadlock.
The Level defines the level type.
const (
Trace Level = iota + 1
Debug
Info
Warn
Error
Fatal
Off
)
All available levels here.
A Record contains all information of a log.
type Writer interface {
Write(bs []byte , record *Record )
}
Writer is the interface that a writer of a Logger needs to implement.
A Writer must NOT modify the bs and record.
Do NOT call any method of the Logger within Write, or it may deadlock.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.