log

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LabeledLogger

type LabeledLogger struct {
	Label string
	Logger
}

LabeledLogger Will add a label to all messages.

func (LabeledLogger) Printf

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

func (LabeledLogger) Println

func (l LabeledLogger) Println(v ...interface{})

type Logger

type Logger interface {
	Println(v ...interface{})
	Printf(format string, v ...interface{})
}

Logger is used to log messages to output.

type TimedLogger

type TimedLogger struct {
	Time   func() time.Time
	Format *string
	Logger
}

TimedLogger will add current time to all messages.

func (TimedLogger) Printf

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

func (TimedLogger) Println

func (l TimedLogger) Println(v ...interface{})

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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