loglg

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package loglg adapts stdlib's log pkg for use with the lg interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

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

Log implements lg.Log.

func New

func New() *Log

New returns a Log instance that writes to os.Stdout, reporting caller and log level.

func NewWith

func NewWith(w io.Writer, timestamp, level, caller bool) *Log

NewWith returns a Log that writes to w. The timestamp, level and caller params determine if those fields are reported.

func (*Log) Debug

func (l *Log) Debug(a ...interface{})

func (*Log) Debugf

func (l *Log) Debugf(format string, a ...interface{})

func (*Log) Error

func (l *Log) Error(a ...interface{})

func (*Log) Errorf

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

func (*Log) Warn

func (l *Log) Warn(a ...interface{})

func (*Log) WarnIfCloseError

func (l *Log) WarnIfCloseError(c io.Closer)

func (*Log) WarnIfError

func (l *Log) WarnIfError(err error)

func (*Log) WarnIfFuncError

func (l *Log) WarnIfFuncError(fn func() error)

func (*Log) Warnf

func (l *Log) Warnf(format string, a ...interface{})

Jump to

Keyboard shortcuts

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