logger

package
v0.9.18 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2014 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package logger implements a standardized logger with callback functionality

Index

Constants

This section is empty.

Variables

View Source
var DefaultLogger = New()

Functions

This section is empty.

Types

type LogLevel

type LogLevel int
const (
	LevelDebug LogLevel = iota
	LevelInfo
	LevelOK
	LevelWarn
	LevelFatal
	NumLevels
)

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func New

func New() *Logger

func (*Logger) AddHandler

func (l *Logger) AddHandler(level LogLevel, h MessageHandler)

func (*Logger) Debugf

func (l *Logger) Debugf(format string, vals ...interface{})

func (*Logger) Debugln

func (l *Logger) Debugln(vals ...interface{})

func (*Logger) Fatalf

func (l *Logger) Fatalf(format string, vals ...interface{})

func (*Logger) Fatalln

func (l *Logger) Fatalln(vals ...interface{})

func (*Logger) Infof

func (l *Logger) Infof(format string, vals ...interface{})

func (*Logger) Infoln

func (l *Logger) Infoln(vals ...interface{})

func (*Logger) Okf

func (l *Logger) Okf(format string, vals ...interface{})

func (*Logger) Okln

func (l *Logger) Okln(vals ...interface{})

func (*Logger) SetFlags

func (l *Logger) SetFlags(flag int)

func (*Logger) SetPrefix

func (l *Logger) SetPrefix(prefix string)

func (*Logger) Warnf

func (l *Logger) Warnf(format string, vals ...interface{})

func (*Logger) Warnln

func (l *Logger) Warnln(vals ...interface{})

type MessageHandler

type MessageHandler func(l LogLevel, msg string)

Jump to

Keyboard shortcuts

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