logmgr

package
v1.5.2-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

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, 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.

func (*LogManager) Start

func (lm *LogManager) Start(system tether.System) error

Start log rotate loop.

func (*LogManager) Stop

func (lm *LogManager) Stop() error

Stop loop.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL