Skip to content

wayneashleyberry/logfmt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An opinionated log formatter that you probably don't want to use.

  • logfmt reads from stdin and prints formatted logs
  • logfmt expects structured json with certain keys
  • logfmt formats output to be similar to Google Cloud Platform Logging

Installation

You will need to have your $PATH setup to your go installation.

# Add this to your terminal .rc file
export PATH="$HOME/go/bin:$PATH"
go get -u github.com/wayneashleyberry/logfmt

Usage

logfmt reads from stdin, so pipe the output from your service into logfmt:

go run myapp.go | logfmt

Example

cat testdata/test.json | go run main.go

screen shot 2018-05-27 at 12 27 47

About

An opinionated log formatter that you probably don't want to use.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages