fmt

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(level Level) log.Logger

New generates a new logger with the defined minimum logging level this will default the outputs to os.Stdout and os.Stderr respectively.

func NewWithOutputs

func NewWithOutputs(level Level, out, err io.Writer) log.Logger

NewWithOutputs generates a new logger with the defined minimum logging level, and writers to where logs are written to.

Types

type Level

type Level uint32

Level represents a logging level.

const (
	// LevelNone sets a logger so show no logging information.
	LevelNone Level = 0

	// LevelError sets a logger to show helpers messages only.
	LevelError Level = 1

	// LevelWarn sets a logger to show warning messages or anything more
	// severe.
	LevelWarn Level = 2

	// LevelInfo sets a logger to show informational messages or anything more
	// severe.
	LevelInfo Level = 3

	// LevelDebug sets a logger to show informational messages or anything more
	// severe.
	LevelDebug Level = 4
)

Jump to

Keyboard shortcuts

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