Skip to content

iguanesolutions/auto-slog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Golang auto slog (structured logger)

Go Reference

This lib allows to simply create a Golang structured logger with its handler automatically selected:

Installation

go get -u github.com/iguanesolutions/auto-slog

Usage

package main

import (
	"log/slog"

	autoslog "github.com/iguanesolutions/auto-slog"
)

func main() {
	logger := autoslog.NewLogger(autoslog.LogLevel("INFO"))
	logger.Info("Hello !", slog.Any("key", "value"))
}

About

Create a Golang structured logger automatically adapted to the output

Topics

Resources

License

Stars

Watchers

Forks

Languages