logging

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: MPL-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RotatingLogWriter

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

RotatingLogWriter is an io.Writer which can rotate the log files that it is writing to Target files are rotated once per day according to the local system time

func NewRotatingLogWriter

func NewRotatingLogWriter(directory string, prefix string) *RotatingLogWriter

RotatingLogWriter returns io.Writer which always writes to a file in the given `directory`. The file is named `{prefix}-YYYY-MM-DD.log` and the log files are rotated once per day as per the system time

func (*RotatingLogWriter) Write

func (w *RotatingLogWriter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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