Skip to content

github.com/sirupsen/logrus with filename and line number

Notifications You must be signed in to change notification settings

neohe/logrus-wraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

logrus-wraper

github.com/sirupsen/logrus with filename and line number

usage

package main

import (
	log "github.com/neohe/logrus-wraper"
	"github.com/sirupsen/logrus"
)

func main() {
	log.SetLogFormatter(&logrus.TextFormatter{
		ForceColors:     true,
		FullTimestamp:   true,
		TimestampFormat: "2006-01-02 15:04:05",
	})

	log.Info("This is an example")
}

output

INFO[2018-12-06 21:05:02] This is an example                            file="main.go:15"

About

github.com/sirupsen/logrus with filename and line number

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages