func Errorf(format string, args ...interface{}) {
	defaultLogger.Errorf(format, args...)
}
Errorf package-level convenience method.
package log
import (
	"os"
	"github.com/sirupsen/logrus"
	"clairvoyance/config"
)
type Logger interface {
	Debug(args ...interface{})
	Debugf(format string, args ...interface{})
	Debugln(args ...interface{})
	Error(args ...interface{})
	Errorf(format string, args ...interface{})
	Errorln(args ...interface{})
	Fatal(args ...interface{})
	Fatalf(format string, args ...interface{})
	Fatalln(args ...interface{})
	Info(args ...interface{})
	Infof(format string, args ...interface{})
	Infoln(args ...interface{})
	Panic(args ...interface{})
	Panicf(format string, args ...interface{})
	Panicln(args ...interface{})
	Print(args ...interface{})
	Printf(format string, args ...interface{})
	Println(args ...interface{})
	Warn(args ...interface{})
	Warnf(format string, args ...interface{})
	Warning(args ...interface{})
	Warningf(format string, args ...interface{})
	Warningln(args ...interface{})
	Warnln(args ...interface{})
}
var defaultLogger *logrus.Logger
func init() {
	defaultLogger = newLogrusLogger(config.Config())
	defaultLogger.SetLevel(logrus.InfoLevel)
}
func NewLogger(cfg config.Provider) *logrus.Logger {
	return newLogrusLogger(cfg)
}
func newLogrusLogger(cfg config.Provider) *logrus.Logger {
	l := logrus.New()
	if cfg.GetBool("json_logs") {
		l.Formatter = new(logrus.JSONFormatter)
	}
	l.Out = os.Stderr
	switch cfg.GetString("loglevel") {
	case "debug":
		l.Level = logrus.DebugLevel
	case "warning":
		l.Level = logrus.WarnLevel
	case "info":
		l.Level = logrus.InfoLevel
	default:
		l.Level = logrus.DebugLevel
	}
	return l
}
type Fields map[string]interface{}
func (f Fields) With(k string, v interface{}) Fields {
	f[k] = v
	return f
}
func (f Fields) WithFields(f2 Fields) Fields {
	for k, v := range f2 {
		f[k] = v
	}
	return f
}
func WithFields(fields Fields) Logger {
	return defaultLogger.WithFields(logrus.Fields(fields))
}
func Debug(args ...interface{}) {
	defaultLogger.Debug(args...)
}
func Debugf(format string, args ...interface{}) {
	defaultLogger.Debugf(format, args...)
}
func Debugln(args ...interface{}) {
	defaultLogger.Debugln(args...)
}
func Error(args ...interface{}) {
	defaultLogger.Error(args...)
}