Categorygithub.com/coder/flog
modulepackage
1.1.0
Repository: https://github.com/coder/flog.git
Documentation: pkg.go.dev

# README

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

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
New returns a new logger.
No description provided by the author

# Constants

Time formats.
Time formats.

# Structs

No description provided by the author