glog

package
v0.0.0-...-0eec0e3 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() *ofriends

New return a new logger It will lookup configuration from environment variables for initialization LOG_FORMAT can be text/json LOG_OUTPUT can be a file by setting value to file:///path/to/logfile if LOG_OUTPUT is different to a file, it will be redirect to os.Stdout.

Types

type Logger

type Logger interface {
	Infof(format string, v ...interface{})
	Debugf(format string, v ...interface{})
	Warnf(format string, v ...interface{})
	Errorf(format string, v ...interface{})
	Panicf(format string, v ...interface{})

	Infoc(ctx context.Context, format string, v ...interface{})
	Debugc(ctx context.Context, format string, v ...interface{})
	Warnc(ctx context.Context, format string, v ...interface{})
	Errorc(ctx context.Context, format string, v ...interface{})
	Panicc(ctx context.Context, format string, v ...interface{})

	WithField(field string, value interface{}) Logger
	Close() error
}

Logger is an interface of logging operations

Jump to

Keyboard shortcuts

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