vlog

package
v0.0.0-...-b9d6073 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2018 License: Apache-2.0 Imports: 16 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FlushInterval = 5 * time.Second
View Source
var MaxSize uint64 = 1024 * 1024 * 1800
View Source
var Stats struct {
	Info, Warning, Error OutputStats
}

Functions

func CopyStandardLogTo

func CopyStandardLogTo(name string)

func Errorf

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

func Errorln

func Errorln(args ...interface{})

func Fatalf

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

func Fatalln

func Fatalln(args ...interface{})

func Flush

func Flush()

func Infof

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

func Infoln

func Infoln(args ...interface{})

func LogInit

func LogInit(logger Logger)

func Warningf

func Warningf(format string, args ...interface{})

func Warningln

func Warningln(args ...interface{})

Types

type Level

type Level int32

func (*Level) Get

func (l *Level) Get() interface{}

Get is part of the flag.Value interface.

func (*Level) Set

func (l *Level) Set(value string) error

Set is part of the flag.Value interface.

func (*Level) String

func (l *Level) String() string

type Log

type Log struct {
	Instance *loggingT
}

func (Log) Errorf

func (l Log) Errorf(format string, args ...interface{})

func (Log) Errorln

func (l Log) Errorln(args ...interface{})

func (Log) Fatalf

func (l Log) Fatalf(format string, args ...interface{})

func (Log) Fatalln

func (l Log) Fatalln(args ...interface{})

func (Log) Flush

func (l Log) Flush()

func (Log) Infof

func (l Log) Infof(format string, args ...interface{})

func (Log) Infoln

func (l Log) Infoln(args ...interface{})

func (Log) Warningf

func (l Log) Warningf(format string, args ...interface{})

func (Log) Warningln

func (l Log) Warningln(args ...interface{})

type Logger

type Logger interface {
	Infoln(...interface{})
	Infof(string, ...interface{})
	Warningln(...interface{})
	Warningf(string, ...interface{})
	Errorln(...interface{})
	Errorf(string, ...interface{})
	Fatalln(...interface{})
	Fatalf(string, ...interface{})
	Flush()
}

type OutputStats

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

OutputStats tracks the number of output lines and bytes written.

func (*OutputStats) Bytes

func (s *OutputStats) Bytes() int64

Bytes returns the number of bytes written.

func (*OutputStats) Lines

func (s *OutputStats) Lines() int64

Lines returns the number of lines written.

type Verbose

type Verbose bool

func V

func V(level Level) Verbose

func (Verbose) Info

func (v Verbose) Info(args ...interface{})

func (Verbose) Infof

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

func (Verbose) Infoln

func (v Verbose) Infoln(args ...interface{})

Jump to

Keyboard shortcuts

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