logging

package
v3.0.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Debug = log.New(os.Stdout, "[DEBUG] ", flags)
View Source
var Error = log.New(os.Stderr, "[ERROR] ", flags)
View Source
var Info = log.New(os.Stdout, "[INFO] ", flags)
View Source
var OriginalStdOut = os.Stdout
View Source
var Server = log.New(os.Stdout, "[SERVER] ", flags)

Functions

func Close

func Close()

func CreateServiceLogger

func CreateServiceLogger(string) io.Writer

func Initialize

func Initialize(useFiles bool)

func MultiWriter

func MultiWriter(writers ...io.Writer) io.Writer

MultiWriter creates a writer that duplicates its writes to all the provided writers, similar to the Unix tee(1) command.

Each write is written to each listed writer, one at a time. If a listed writer returns an error, that overall write operation stops and returns the error; it does not continue down the list.

Types

type Rotator

type Rotator struct {
	sync.RWMutex
	io.WriteCloser
	// contains filtered or unexported fields
}

func (*Rotator) Close

func (r *Rotator) Close() error

func (*Rotator) Rotate

func (r *Rotator) Rotate(newBackend io.WriteCloser)

func (*Rotator) StartRotation

func (r *Rotator) StartRotation(dir string)

func (*Rotator) Write

func (r *Rotator) 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