logging

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxLogSize defines the maximum log size we should permit.
	// Zendesk has a file size limit of 20MB. When the last N log files are zipped,
	// it should fit under 20MB. So here we permit up to 10MB (most files are a few hundred kB).
	MaxLogSize = 10 * 2 << 20

	// MaxLogs defines how many old log files should be kept.
	MaxLogs = 3
)

Variables

This section is empty.

Functions

func DumpStackTrace

func DumpStackTrace(logsPath string) crash.RecoveryAction

func Init

func Init(logsPath string) error

func SetLevel

func SetLevel(level string)

Types

type FileProvider

type FileProvider func() (io.WriteCloser, error)

type Rotator

type Rotator struct {
	// contains filtered or unexported fields
}

func NewRotator

func NewRotator(maxSize int, getFile FileProvider) (*Rotator, error)

func (*Rotator) Write

func (r *Rotator) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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