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()
}

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()
}

Use the default setup for logrus
[MIST-372] Use the default setup for logrus
