Documentation ¶
Overview ¶
Package writer provides wrappers to the interface Writer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReportDetails ¶ added in v0.6.0
ReportDetails calls log.Output with the err and the bs.
Types ¶
type Async ¶ added in v0.3.0
type Async struct {
// contains filtered or unexported fields
}
An Async is a Writer wrapper. All Writers an Async wraps switch into asynchronous mode.
All methods of an Async are concurrency safe. An Async MUST be created with NewAsync.
func NewAsync ¶ added in v0.3.0
NewAsync creates a new Async that wraps the writer. The writer must NOT be nil. The cap is the capacity of the internal channel of the Async and it must NOT be negative.
func (*Async) Abort ¶ added in v0.3.0
func (async *Async) Abort()
Abort closes the internal channel and ignores all logs in the channel. It does NOT close the underlying writer.
func (*Async) Close ¶ added in v0.3.0
func (async *Async) Close()
Close closes the internal channel and waits until all logs in the channel have been output. It does NOT close the underlying writer.
type ErrorHandler ¶ added in v0.6.0
The ErrorHandler type is a function type used to handle errors. Do NOT call any method of the Writer or the Logger within the function, or it may deadlock.
Directories ¶
Path | Synopsis |
---|---|
Package file implements a file writer which implements the Writer.
|
Package file implements a file writer which implements the Writer. |
socket
|
|
tcp
Package tcp implements a tcp socket writer which implements the Writer.
|
Package tcp implements a tcp socket writer which implements the Writer. |
unix
Package unix implements a unix domain socket writer which implements the Writer.
|
Package unix implements a unix domain socket writer which implements the Writer. |
Package syslog implements a syslog writer which implements the Writer.
|
Package syslog implements a syslog writer which implements the Writer. |