loggy

package
v0.0.0-...-09eda65 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package loggy contains a simple logger interoperable with the standard library. It is name loggy simply to avoid naming conflicts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNullLogger

func NewNullLogger() *log.Logger

Types

type CompositeLogger

type CompositeLogger struct {
	Loggers []io.Writer
}

func (CompositeLogger) Write

func (c CompositeLogger) Write(p []byte) (int, error)

type Fields

type Fields map[string]interface{}

func NewEvent

func NewEvent(level Level, message string, fields Fields) Fields

func (Fields) String

func (f Fields) String() string

type FileLogger

type FileLogger struct {
	Path   string
	Writer io.Writer
	Perm   os.FileMode
}

func (*FileLogger) Write

func (f *FileLogger) Write(p []byte) (int, error)

type Level

type Level int
const (
	DebugLevel Level = iota
	InfoLevel
	WarnLevel
	ErrorLevel
	FatalLevel
)

func (Level) String

func (l Level) String() string

Jump to

Keyboard shortcuts

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