Skip to content

satazor/prettylog

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prettylog

A golang log/slog handler for pretty console output, designed to be used during development time only.

This package was created from this article by dusted.codes with improvements from this repository by dusted-go.

This is mainly for me to have a single source to easily retrieve this code in my own projects. If anyone is seriously interested in this software I highly recommend visiting dusted-go's repo instead.

An example (for me):

prettyHandler := prettylog.NewHandler(&slog.HandlerOptions{
    Level:       slog.LevelInfo,
    AddSource:   false,
    ReplaceAttr: nil,
})
logger := slog.New(prettyHandler)

About

A really nice golang slog handler I found

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%