Skip to content
This repository has been archived by the owner on Jan 1, 2021. It is now read-only.

Latest commit

 

History

History
24 lines (18 loc) · 495 Bytes

README.md

File metadata and controls

24 lines (18 loc) · 495 Bytes

logrus-ltsv

LTSV Formatter for Logrus(github.com/sirupsen/logrus)

Usage

package main

import (
	"github.com/doloopwhile/logrusltsv"
	log "github.com/sirupsen/logrus"
)

func main() {
	log.SetFormatter(&logrusltsv.Formatter{})

	log.WithFields(log.Fields{
		"animal": "walrus",
		"size":   10,
	}).Info("A walrus appears")

	// => time:2015-03-23T12:24:35+09:00\tlevel:info\tmsg:A walrus appears\tanimal:walrus\tsize:10
}