Skip to content

kodefluence/journal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Journal

A logging library with standard output with JSON format written in Go.

How to use

You can print info log by doing:

journal.Info("Starting application at port: 8080").Log()

You can use any other log level like warning or error:

journal.Error("Failed to unmarshal JSON.", err).Log()
journal.Warning("Cannot connect to MYSQL").Log()

Set tags for your log:

journal.Info("Starting application at port: 8080").
  SetTags("server", "boot").
  Log()

or add custom field:

journal.Info("Starting application at port: 8080").
  SetTags("server", "boot").
  AddField("env", "production")
  Log()

About

Logging into standard output with JSON format in Go.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages