lgexpire

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package lgexpire implements log file cleanup of old lg (glog) logs. This package's API's might change, escpecially when it comes to what's considered and which errors are returned.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotLgFile = errors.New("non a lg log file name")

Functions

This section is empty.

Types

type Expire

type Expire struct {
	LogDir   string   // The directory where the log files are located
	Programs []string // the programs to consider.
	Rules    []Rule   // Additional rules for removal
	// contains filtered or unexported fields
}

Expire .

func (*Expire) Run

func (r *Expire) Run() error

type Rule

type Rule struct {
	Level string        // applies to all levels if not specified
	Age   time.Duration // keep logs newer than this
	Count uint          // keep maxium amount of logs
}

Rule for log expiery, all specified fields are considered together.

Jump to

Keyboard shortcuts

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