log

package
v3.0.0-...-c77a060 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LvlOutline shows client version & arguments passed in, HTTP URLs & status codes, subprocess calls.
	LvlOutline = 1 + iota
	// LvlArgs shows args going in to library functions
	LvlArgs
	// LvlFlags is used to show/hide the way flags and command line arguments are being messed with in main
	LvlFlags
	// LvlHTTPData is used to show/hide raw HTTP request and response bodies.
	LvlHTTPData
	// LvlMisc is used for any other minutiae
	LvlMisc
)

Variables

View Source
var DebugLevel int

DebugLevel determines whether or not debugging output should be output to stderr.

View Source
var ErrWriter io.Writer = os.Stderr

ErrWriter is the output destination for error messages, warnings, etc.

View Source
var LogFile *os.File

LogFile is the file which bytemark-client is to log to. This can be nil, in which case it won't. Usually ~/.bytemark/debug.log

View Source
var Writer io.Writer = os.Stdout

Writer is the output destination for normal output

Functions

func Debug

func Debug(level int, stuff ...interface{})

Debug outputs stuff to LogFile, and to Stderr if DebugLevel >= level. One thing per line.

func Debugf

func Debugf(level int, format string, args ...interface{})

Debugf formats the string and outputs it to LogFile, and to Stderr if DebugLevel >= level.

func Error

func Error(stuff ...interface{})

Error outputs stuff to ErrWriter and LogFile, one thing per line.

func Errorf

func Errorf(format string, args ...interface{})

Errorf formats the string and outputs it to Stderr and Logfile.

func Log

func Log(stuff ...interface{})

Log outputs stuff to ErrWriter and LogFile, one thing per line.

func Logf

func Logf(format string, args ...interface{})

Logf formats the string and outputs it to Stderr and Logfile.

func Output

func Output(stuff ...interface{})

Output outputs stuff to os.Stdout and LogFile, one thing per line.

func Outputf

func Outputf(format string, args ...interface{})

Outputf formats the string and outputs it to Stdout and Logfile.

Types

This section is empty.

Jump to

Keyboard shortcuts

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