Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NilLogLogger = log.New(io.Discard, "", 0) NilLogger nilLogger )
Functions ¶
Types ¶
type Logger ¶ added in v0.0.2
Logger is the interface that defines the methods to logging.
func Global ¶ added in v0.2.0
func Global() Logger
Global returns a logger that is set as global. If the global logger is not set then it returns NilLogger.
func NewLoggerWriteRotateCloser ¶ added in v0.2.0
func NewLoggerWriteRotateCloser(cfg config.Log, out WriteRotateCloser) (Logger, error)
NewLoggerWriteRotateCloser returns a new logger with out.
type NopWriteRotateCloser ¶ added in v0.2.0
NopWriteRotateCloser is a Writer with no-op Rotate and Close methods.
func (*NopWriteRotateCloser) Close ¶ added in v0.2.0
func (*NopWriteRotateCloser) Close() error
Close does nothing, returns nil.
func (*NopWriteRotateCloser) Rotate ¶ added in v0.2.0
func (*NopWriteRotateCloser) Rotate() error
Rotate does nothing, returns nil.
type Rotater ¶ added in v0.1.0
type Rotater interface {
Rotate() error
}
Rotater is the interface that defines the methods to rotate files.
type WriteRotateCloser ¶ added in v0.2.0
type WriteRotateCloser interface {
io.WriteCloser
Rotater
}
WriteRotateCloser is the interface that groups the Rotate and basic Write, Close methods.
Click to show internal directories.
Click to hide internal directories.