Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var LogRotateBinary = "/usr/sbin/logrotate"
LogRotateBinary points to a logrotate path in the system. For testing purposes it should be overwritten to be empty.
Functions ¶
This section is empty.
Types ¶
type LogManager ¶
type LogManager struct {
// contains filtered or unexported fields
}
LogManager runs logrotate for specified log files. TODO: Upload compressed logs into vSphere storage. TODO: Upload all logs into vSphere storage during graceful shutdown.
func NewLogManager ¶
func NewLogManager(runInterval time.Duration) (*LogManager, error)
NewLogManager creates a new log manager instance.
func (*LogManager) AddLogRotate ¶
func (lm *LogManager) AddLogRotate(logFilePath string, ri RotateInterval, maxSize, maxLogFiles int64, compress bool)
AddLogRotate adds a log to rotate.
func (*LogManager) Reload ¶
func (lm *LogManager) Reload(*tether.ExecutorConfig) error
Reload - just to satisfy Tether interface.
type RotateInterval ¶
type RotateInterval uint32
RotateInterval defines a type for a log rotate frequency.
const ( // Daily to trim logs daily. Daily RotateInterval = iota // Hourly to trim logs hourly. Hourly // Weekly to trim logs weekly. Weekly // Monthly to trim logs monthly. Monthly )
Click to show internal directories.
Click to hide internal directories.