Documentation ¶
Overview ¶
Package log implements a logger interface that can be used within the go-mail package
Index ¶
Constants ¶
View Source
const ( // DirString is a constant used for the structured logger DirString = "direction" // DirFromString is a constant used for the structured logger DirFromString = "from" // DirToString is a constant used for the structured logger DirToString = "to" )
View Source
const CallDepth = 2
CallDepth is the call depth value for the log.Logger's Output method This defaults to 2 and is only here for better readablity of the code
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Direction ¶ added in v0.4.1
type Direction int
Direction is a type wrapper for the direction a debug log message goes
type JSONlog ¶ added in v0.4.1
type JSONlog struct {
// contains filtered or unexported fields
}
JSONlog is the default structured JSON logger that satisfies the Logger interface
func NewJSON ¶ added in v0.4.1
NewJSON returns a new JSONlog type that satisfies the Logger interface
type Log ¶ added in v0.4.1
Log represents a log message type that holds a log Direction, a Format string and a slice of Messages
type Stdlog ¶
type Stdlog struct {
// contains filtered or unexported fields
}
Stdlog is the default logger that satisfies the Logger interface
Click to show internal directories.
Click to hide internal directories.