Version: v0.8.8 Latest Latest

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

Go to latest
Published: Mar 2, 2017 License: MPL-2.0 Imports: 7 Imported by: 0




View Source
const (
	EnvLog     = "TF_LOG"      // Set to True
	EnvLogFile = "TF_LOG_PATH" // Set to a file

These are the environmental variables that determine if we log, and if we log whether or not the log should go to a file.


This section is empty.


func IsDebugOrHigher added in v0.6.13

func IsDebugOrHigher() bool

IsDebugOrHigher returns whether or not the current log level is debug or trace

func LogLevel added in v0.6.13

func LogLevel() string

LogLevel returns the current log level string based the environment vars

func LogOutput

func LogOutput() (logOutput io.Writer, err error)

LogOutput determines where we should send logs (if anywhere) and the log level.

func SetOutput added in v0.7.0

func SetOutput()

SetOutput checks for a log destination with LogOutput, and calls log.SetOutput with the result. If LogOutput returns nil, SetOutput uses ioutil.Discard. Any error from LogOutout is fatal.


This section is empty.

Source Files

Jump to

Keyboard shortcuts

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