golog

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2022 License: MIT Imports: 3 Imported by: 9

README

golog

Build Status Go Reference

Simple golang logger interface for use in library development

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Level

type Level int
const (
	CRITICAL Level = iota
	ERROR
	WARNING
	INFO
	DEBUG
)

func LogLevel

func LogLevel(level string) (Level, error)

LogLevel returns the log level from a string representation

func (Level) String

func (p Level) String() string

String returns the string representation of the logging level

type Logger

type Logger interface {
	Print(level Level, v ...interface{})
	Println(level Level, v ...interface{})
	Printf(level Level, format string, v ...interface{})
}

func NewGoLogger

func NewGoLogger(level Level, log *log.Logger) Logger

Jump to

Keyboard shortcuts

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