jsonlog

package
v0.0.0-...-be4c55d Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LevelInfo level = iota
	LevelError
	LevelFatal
	LevelOff
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

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

Logger holds the output destination that the log entries will be written to, the minimum severity level that log entries will be written for, plus a mutex for coordinating the writes.

func New

func New(out io.Writer, minLevel level) *Logger

New Returns a new Logger instance which writes log entries at or above a minimum severity level to a specific output destination.

func (*Logger) PrintError

func (l *Logger) PrintError(err error, properties map[string]string)

func (*Logger) PrintFatal

func (l *Logger) PrintFatal(err error, properties map[string]string)

func (*Logger) PrintInfo

func (l *Logger) PrintInfo(message string, properties map[string]string)

func (*Logger) Write

func (l *Logger) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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