Skip to content

fagougou/fgglogrus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fgglogrus

a logrus wrapper with some configs

Feature

  • Add fields: app, env
  • Log to file when os.Getenv("ENV") === production
  • Logfiles sperated by date.

Usage

package main

import (
	. "github.com/fagougou/fgglogrus"
	"github.com/sirupsen/logrus"
)

func main() {

	FggLogrus.Info("A group of walrus emerges from the ocean")

	FggLogrus.WithFields(logrus.Fields{
		"omg":    true,
		"number": 122,
	}).Warn("The group's number increased tremendously!")

	FggLogrus.Error("The ice breaks!")
	FggLogrus.Error("The ice errrrrrr!")

}

About

Logger for projects written in Golang.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages