Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RollingWriter ¶
RollingWriter represents logs writer with logs rolling and cleanup support.
func NewRollingWriter ¶
func NewRollingWriter(filepath string) (writer *RollingWriter, err error)
NewRollingWriter creates new rolling writer.
func (*RollingWriter) CleanObsoleteLogs ¶
func (w *RollingWriter) CleanObsoleteLogs() error
CleanObsoleteLogs cleans obsolete logs so that the count of remaining log files is equal to w.config.MaxRemain. rollingWriter only handles file rolling at runtime, but if the node is restarted, the count is lost thus we have to do this manually.
Click to show internal directories.
Click to hide internal directories.