util

package
v0.0.0-...-ff11b4d Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2015 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package util provides simple wrapper on top of log package. You can set the logging level using Level variable.

Index

Constants

This section is empty.

Variables

View Source
var (
	//Level is current level of logging. See #Levels
	Level = "INFO"
	//Levels is all possible logging levels
	Levels = map[string]int{
		"FATAL": 1,
		"ERROR": 2,
		"WARN":  3,
		"INFO":  4,
		"DEBUG": 5,
	}
)

Functions

func Debug

func Debug(message string, fmt ...interface{})

Debug prints debug message if the level enabled

func Err

func Err(message string, fmt ...interface{})

Err prints error message if the level enabled

func Fatalf

func Fatalf(message string, fmt ...interface{})

Fatalf prints fatal message and exit the program

func Info

func Info(message string, fmt ...interface{})

Info prints info message if the level enabled

func Warn

func Warn(message string, fmt ...interface{})

Warn prints warning message if the level enabled

Types

This section is empty.

Jump to

Keyboard shortcuts

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