splog

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: MIT Imports: 7 Imported by: 0

README

Simple logger

splog is a Go package provides an easy-to-use logger in the style of fmt.Println().
It is designed to be lightweight and does not have any external dependencies.

Documentation

Index

Constants

View Source
const (
	LevelDebug uint = 0
	LevelInfo  uint = 1
	LevelWarn  uint = 2
	LevelErr   uint = 3
)

Variables

This section is empty.

Functions

func NewLoggerOptions

func NewLoggerOptions() *loggerOptions

Types

type Logger

type Logger interface {
	Close()
	Log(level int, args ...any)

	Debug(args ...any)
	Info(args ...any)
	Warn(args ...any)
	Error(args ...any)
	Fatal(args ...any)
}

Logger is the interface difinition for a simple logger as used by this library.

func NewLogger

func NewLogger(o *loggerOptions) Logger

Jump to

Keyboard shortcuts

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