hhlog

package
v0.0.0-...-6a85243 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package hhlog is a printf-style logging package. It accepts both standard and debugging messages; standard messages are written immediately to console, but debugging messages are buffered internally. If the application encounters an error, it can annotate the error with the accumulated debug logs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

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

Logger is a simple printf-style logger.

func New

func New() *Logger

New returns a logger that writes to standard out.

func NewNop

func NewNop() *Logger

NewNop returns a logger that never writes any output.

func (*Logger) Annotate

func (l *Logger) Annotate(err error) error

Annotate decorates the supplied error with any debugging information accumulated on the logger.

func (*Logger) Debugf

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

Debugf buffers a debugging message.

func (*Logger) Printf

func (l *Logger) Printf(format string, args ...interface{})

Printf writes out the supplied message immediately.

Jump to

Keyboard shortcuts

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