package main

import (
	log "github.com/Sirupsen/logrus"
	"github.com/mistifyio/mistify-dhcp"
	logx "github.com/mistifyio/mistify-logrus-ext"
)

func main() {
	log.DefaultSetup("info")

	conf, err := dhcp.GetConfig()
	if err != nil {
		log.WithFields(log.Fields{
			"error": err,
			"func":  "dhcp.GetConfig",
		}).Fatal(err)
	}

	server := dhcp.NewServer(conf)
	server.Run()
}

package main

import (
	log "github.com/Sirupsen/logrus"
	"github.com/mistifyio/mistify-dhcp"
	logx "github.com/mistifyio/mistify-logrus-ext"
)

func main() {
	log.SetFormatter(&log.JSONFormatter{})
	log.AddHook(&logx.ErrorMessageHook{})

	conf, err := dhcp.GetConfig()
	if err != nil {
		log.WithFields(log.Fields{
			"error": err,
			"func":  "dhcp.GetConfig",
		}).Fatal(err)
	}

	server := dhcp.NewServer(conf)
	server.Run()
}

--- 
+++ 
@@ -7,8 +7,7 @@
 )
 
 func main() {
-	log.SetFormatter(&log.JSONFormatter{})
-	log.AddHook(&logx.ErrorMessageHook{})
+	log.DefaultSetup("info")
 
 	conf, err := dhcp.GetConfig()
 	if err != nil {
[MIST-372] Use the default setup for logrus
