logging

package
v0.0.0-...-4377129 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package logging implements a Go-compatible loggers such as console and basic file rotation.

Silver's logging requirements are very basic. We'll roll our own rather than bring in a fatter dependency like Seelog. All we require on top of Go's basic logging is some very basic file rotation (at the moment only one level).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseAllOpenFileLoggers

func CloseAllOpenFileLoggers()

CloseAllOpenFileLoggers is a convenience method for tests

func NewConsoleLogger

func NewConsoleLogger() (logger *log.Logger)

NewConsoleLogger is a basic logger to Stderr

func NewFileLogger

func NewFileLogger(file string, owner string) (logger *log.Logger)

NewFileLogger implements a rolling logger with default maximum size (50Mb)

func NewFileLoggerWithMaxSize

func NewFileLoggerWithMaxSize(file string, owner string, maxSize int64) (logger *log.Logger)

NewFileLoggerWithMaxSize implements a rolling logger with a set size

func NewNilLogger

func NewNilLogger() *log.Logger

NewNilLogger is a logger noop/discade implementation

Types

This section is empty.

Jump to

Keyboard shortcuts

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