Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultLogTimeFormat ¶ added in v0.2.0
func DefaultLogTimeFormat() string
DefaultLogTimeFormat return the default log time format
func InitDefaultLogTimeFormat ¶ added in v0.2.1
func InitDefaultLogTimeFormat(f string)
InitDefaultLogTimeFormat init the global default log time format
Types ¶
type Content ¶
type Content struct { Level level.Level `json:"level"` Time *Time `json:"time,omitempty"` Log string `json:"log"` Error error `json:"-"` AppendTime bool `json:"-"` Args []any `json:"-"` }
Content the log content info
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error the custom error for log
func (Error) MarshalText ¶
MarshalText implement interface encoding.TextMarshaler
type Time ¶
type Time struct {
// contains filtered or unexported fields
}
Time the custom Time for log
func NewTimeWithFormat ¶ added in v0.2.0
NewTimeWithFormat convert time.Time to content.Time pointer with custom format
func (Time) MarshalText ¶
MarshalText implement interface encoding.TextMarshaler
Click to show internal directories.
Click to hide internal directories.