Documentation ¶
Overview ¶
to define the log entry struct
to define the Formatter interface for formatting based on different format
to implement a text formatter fundemental text output format
the logger is to construct logs
Index ¶
Constants ¶
View Source
const (
FmtEmptySeparate = ""
)
Variables ¶
Functions ¶
Types ¶
type Entry ¶
type Entry struct { Buffer *bytes.Buffer Map map[string]interface{} Level Level Time time.Time File string // the file which prints this entry Line int // the code line where this entry is printed Func string // the function which prints this entry Format string // the format of argument delimiter Args []interface{} // contains filtered or unexported fields }
type Option ¶
type Option func(*options)
func WithDisableCaller ¶
func WithFormatter ¶
func WithStdLevel ¶
type TextFormatter ¶
type TextFormatter struct { // to determine if the basic info should be printed IgnoreBasicFields bool }
func (*TextFormatter) Format ¶
func (f *TextFormatter) Format(e *Entry) error
Click to show internal directories.
Click to hide internal directories.