Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

coder/flog

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flog

flog is a minimal, formatted, pretty logging package for Go.

It's optimized for human readability and CLIs.

  • Log levels color-code the timestamp
  • Log level doesn't change the width of the prefix

slog is recommended for robust logging.

GoDoc

Install

go get github.com/coder/flog

Usage

flog.Infof("hello %.3f", 1/3.0)
flog.Successf("finished that")
flog.Errorf("oops")

log := flog.New(os.Stderr).WithPrefix("user %v: ", 500)

log.Errorf("didn't work out")

Output

example

About

Pretty formatted log for Go

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.