Documentation
¶
Overview ¶
LogManager implements io.Writer from os, and is meant to be used directly with the log package. Use NewLogManager() to create a new LogManager with your desired settings. Upon Write(), it will manage rotation, compression, etc. rather than scheduling rotation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogManager ¶
LogManager is the main struct of the package. It implements io.Writer, and is safe for concurrent use.
func NewLogManager ¶
func NewLogManager(options LogManagerOptions) *LogManager
Create a new LogManager. `timeFormat` is the format used in `filenameFormat`. `filenameFormat` is a template string for type LogNameTemplate.
func (*LogManager) Rotate ¶
func (lm *LogManager) Rotate() (err error)
Rotate manually triggers a log rotation
type LogManagerOptions ¶
type LogTemplate ¶
Click to show internal directories.
Click to hide internal directories.