Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
Channel is Logger sensing messages to be logged over a channel.
func NewChannel ¶
func NewChannel(ch chan<- LogMessage) Channel
NewChannel creates a new Channel Logger logging to ch.
WARNING: If the channel gets full, the write of log message will block. Consequently, it's absolutely necessary to provide a channel with sufficient capacity and to guarantee that messages from it are consumed.
type DefaultLog ¶
type DefaultLog struct{}
Log is Logger using default standard logger provided by Go standard log package.
func NewDefaultLog ¶
func NewDefaultLog() *DefaultLog
NewDefaultLog returns instance of Log using default logger of Go standard log package.
func (*DefaultLog) Errorf ¶
func (*DefaultLog) Errorf(format string, args ...interface{})
type Log ¶
type Log struct {
// contains filtered or unexported fields
}
Log is Logger using standard logger provided by Go standard log package.
type LogMessage ¶
type LogMessage struct {
// contains filtered or unexported fields
}
LogMessage represents a single log message to be logger.
This structure groups parameters of a single log line to allow sending them over a channel.