log

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2015 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package log provides a common logging package for ACD with logging level.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(v ...interface{})

Debug wraps Print

func Debugf

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

Debugf wraps Printf

func Error

func Error(v ...interface{})

Error wraps Print

func Errorf

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

Errorf wraps Printf

func Fatal

func Fatal(v ...interface{})

Fatal wraps Print

func Fatalf

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

Fatalf wraps Printf

func Info

func Info(v ...interface{})

Info wraps Print

func Infof

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

Infof wraps Printf

func Levels

func Levels() string

Levels returns a string of all possible levels

func Print

func Print(l Level, v ...interface{})

Print calls Print only if the level is equal or lower than the set level. If the level is FatalLevel, it will call Fatal regardless...

func Printf

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

Printf calls Printf only if the level is equal or lower than the set level. If the level is FatalLevel, it will call Fatalf regardless...

func SetLevel

func SetLevel(l Level)

SetLevel sets the log level to l.

Types

type Level

type Level uint8

Level is a custom type representing a log level.

const (
	// DisableLogLevel disables logging completely.
	DisableLogLevel Level = iota

	// FatalLevel represents a fatal message.
	FatalLevel

	// ErrorLevel represents an error message.
	ErrorLevel

	// InfoLevel represents an info message.
	InfoLevel

	// DebugLevel represents a debug message.
	DebugLevel
)

func GetLevel

func GetLevel() Level

GetLevel sets the log level to l.

func (Level) String

func (i Level) String() string

Jump to

Keyboard shortcuts

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