logging

package
v0.0.0-...-901b40b Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2015 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package logging provides a simple framework for reporting messages and the import progress.

Index

Constants

View Source
const (
	CLEARLINE = "\x1b[2K"
)

Variables

This section is empty.

Functions

func Debugf

func Debugf(msg string, args ...interface{})

func Errorf

func Errorf(msg string, args ...interface{})

func Fatalf

func Fatalf(msg string, args ...interface{})

func Infof

func Infof(msg string, args ...interface{})

func Progress

func Progress(msg string)

func SetQuiet

func SetQuiet(quiet bool)

func Shutdown

func Shutdown()

func Warnf

func Warnf(msg string, args ...interface{})

Types

type Level

type Level int
const (
	FATAL Level = iota
	ERROR
	WARNING
	INFO
	DEBUG
)

type LogBroker

type LogBroker struct {
	Records   chan Record
	Progress  chan string
	StepStart chan Step
	StepStop  chan Step
	// contains filtered or unexported fields
}

func (*LogBroker) SetQuiet

func (l *LogBroker) SetQuiet(quiet bool)

type Logger

type Logger struct {
	Component string
}

func NewLogger

func NewLogger(component string) *Logger

func (*Logger) Error

func (l *Logger) Error(args ...interface{})

func (*Logger) Errorf

func (l *Logger) Errorf(msg string, args ...interface{})

func (*Logger) Fatal

func (l *Logger) Fatal(args ...interface{})

func (*Logger) Fatalf

func (l *Logger) Fatalf(msg string, args ...interface{})

func (*Logger) Print

func (l *Logger) Print(args ...interface{})

func (*Logger) Printf

func (l *Logger) Printf(msg string, args ...interface{})

func (*Logger) Printfl

func (l *Logger) Printfl(level Level, msg string, args ...interface{})

func (*Logger) StartStep

func (l *Logger) StartStep(msg string) string

func (*Logger) StopStep

func (l *Logger) StopStep(msg string)

func (*Logger) Warn

func (l *Logger) Warn(args ...interface{})

func (*Logger) Warnf

func (l *Logger) Warnf(msg string, args ...interface{})

type Record

type Record struct {
	Level     Level
	Component string
	Message   string
}

type Step

type Step struct {
	Component string
	Name      string
}

Jump to

Keyboard shortcuts

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