logger

package
v0.1.24 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: Apache-2.0 Imports: 5 Imported by: 27

Documentation

Index

Constants

View Source
const (
	JsonLogFormat = iota
	SyslogLogFormat
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Format

type Format int

type Handler

type Handler interface {
	Info(description ...string)
	Debug(description ...string)
	Warn(err error)
	Error(err error)
}

func New

func New(appname string, opts Options) (Handler, error)

type Logger

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

func (*Logger) Debug

func (l *Logger) Debug(description ...string)

func (*Logger) Error

func (l *Logger) Error(err error)

func (*Logger) Info

func (l *Logger) Info(description ...string)

func (*Logger) Warn

func (l *Logger) Warn(err error)

type Options

type Options struct {
	Format     Format
	DebugLevel bool
}

Jump to

Keyboard shortcuts

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