Skip to content

Latest commit

 

History

History
34 lines (30 loc) · 1.17 KB

log.md

File metadata and controls

34 lines (30 loc) · 1.17 KB
title goimport gosource
Golang vanity URL page / meta for fortio.org/log

Fortio's log is a simple GoLang logger built on top of go's default one with additional opinionated levels similar to glog but simpler to use and configure.

log.Debugf() // Debug level
log.LogVf()  // Verbose level
log.Infof()  // Info/default level
log.Warnf()  // Warning level
log.Errf()   // Error level
log.Critf()  // Critical level (always logged even if level is set to max)
log.Fatalf() // Fatal level - program will panic/exit

See Config object for options like whether to include line number and file name of caller or not etc

Since 1.4 fortio's logger also supports JSON structured logging, including with extensible attributes:

log.S(log.Info, "msg", log.Attr("key", value)...)

Details on github.com/fortio/log

This page also for making

 go get fortio.org/log

and godoc work.

Back to fortio.org