func (h *WindowsEventLogHook) Levels() []log.Level {
	return log.AllLevels
}
Levels returns the logrus levels that the WindowsEventLogHook handles
package agentmain
import (
	"os"
	"github.com/StackExchange/wmi"
	"github.com/kardianos/service"
	log "github.com/sirupsen/logrus"
)
type WindowsEventLogHook struct {
	logger service.Logger
}
func (h *WindowsEventLogHook) Fire(entry *log.Entry) error {
	msg, err := entry.String()
	if err != nil {
		return err
	}
	switch entry.Level {
	case log.PanicLevel:
		return h.logger.Error(msg)
	case log.FatalLevel:
		return h.logger.Error(msg)
	case log.ErrorLevel:
		return h.logger.Error(msg)
	case log.WarnLevel:
		return h.logger.Warning(msg)
	case log.InfoLevel:
		return h.logger.Info(msg)
	case log.DebugLevel:
		return h.logger.Info(msg)
	default:
		return nil
	}
}