catmullet / logger

Great way to Log in Golang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

logger

Great way to Log in Golang

Import it

import (

  log "github.com/catmullet/logger"
  
)

Understand the line format

"[%s][%s] %s %s, (%s)"

It goes [App Name (Environment variable 'APP')], [Log Level], Message, json object, file and line number)

Use it

// Log Levels Error, Warn, Info, Debug, Fatal
log.Info("Hello")
log.Info("Hello %s", "World")
log.Info("Hello World", object)

About

Great way to Log in Golang


Languages

Language:Go 100.0%