logger

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2019 License: NCSA Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ColoredOutput = true

ColoredOutput controls if logs print in Color or Not

View Source
var LogLevel = DEBUG

LogLevel controls the verboseness of logging

Functions

func Log

func Log(sev Sev, msg string)

Log a messaage at a specific severity

func LogReq

func LogReq(sev Sev, req *http.Request)

LogReq is a helper to log requests

func LogResp

func LogResp(sev Sev, resp *http.Response)

Types

type Sev

type Sev int

Sev is an enum for Logger Severity

const (
	//DEBUG level Message
	DEBUG Sev = 3
	//INFO Level Message
	INFO Sev = 2
	//WARN Level Message
	WARN Sev = 1
	//ERR Level Message
	ERR Sev = 0
	//SPEC Level Message
	SPEC Sev = -1
	//FATAL Level Message
	FATAL Sev = -2
)

Jump to

Keyboard shortcuts

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