log

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FDWriter

type FDWriter interface {
	io.Writer
	Fd() uintptr
}

FDWriter interface extends io.Writer with file descriptor function

type Logger

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

Logger struct definition

func New

func New(out FDWriter, debug bool) *Logger

New returns new Logger instance with predefined writer output and automatically detect terminal coloring support

func (*Logger) Debug

func (l *Logger) Debug(v ...interface{})

Debug print debug message to output if debug output enabled

func (*Logger) Debugf

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

Debugf print formatted debug message to output if debug output enabled

func (*Logger) Error

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

Error print error message to output

func (*Logger) Errorf

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

Errorf print formatted error message to output

func (*Logger) Fatal

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

Fatal print fatal message to output and then exit(1)

func (*Logger) Fatalf

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

Fatalf print formatted fatal message to output and then exit(1)

func (*Logger) Info

func (l *Logger) Info(v ...interface{})

Info print informational message to output

func (*Logger) Infof

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

Infof print formatted informational message to output

func (*Logger) Warn

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

Warn print warning message to output

func (*Logger) Warnf

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

Warnf print formatted warning message to output

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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