log

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2018 License: AGPL-3.0 Imports: 4 Imported by: 14

Documentation

Overview

Package log implements a simple leveled logging interface.

Index

Constants

This section is empty.

Variables

View Source
var (
	Debug = &logger{DebugLevel}
	Info  = &logger{InfoLevel}
	Error = &logger{ErrorLevel}
)

The set of default loggers for each log level.

Functions

func Fatalf

func Fatalf(format string, v ...interface{})

Fatalf writes a formatted message to the log and aborts.

func Print

func Print(v ...interface{})

Print writes a message to the log.

func Printf

func Printf(format string, v ...interface{})

Printf writes a formatted message to the log.

func Println

func Println(v ...interface{})

Println writes a line to the log.

func SetLevel

func SetLevel(l Level)

Types

type Level

type Level int

Level represents the level of logging.

const (
	DebugLevel Level = iota
	InfoLevel
	ErrorLevel
	DisabledLevel
)

Different levels of logging.

Jump to

Keyboard shortcuts

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