logger

package
v0.0.0-...-cc2f434 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2018 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package logger provides a simple anaconda.Logger that uses the standard library's log package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(level Level) anaconda.Logger

New returns an anaconda.Logger that uses the standard library's log package while only printing messages that are at least the given log level.

Types

type Level

type Level uint8

Level is the log level threshold for for a Logger.

const (
	LevelDebug Level = iota
	LevelInfo
	LevelNotice
	LevelWarning
	LevelError
	LevelCritical
	LevelPanic
	LevelFatal
)

These constants are used by New to determine which print statements should be printed to the log.

func ParseLevel

func ParseLevel(s string) Level

ParseLevel converts a string into a Level.

func (Level) String

func (l Level) String() string

String returns the string representation of a Level type.

Jump to

Keyboard shortcuts

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