package logger //import log "github.com/sirupsen/logrus" import ( "github.com/sirupsen/logrus" ) var log = logrus.New() var Mongo *logrus.Entry var Web *logrus.Entry var WebVoice *logrus.Entry var WebMobile *logrus.Entry var Minecraft *logrus.Entry func Init() { /*log.Out = os.Stdout file, err := os.OpenFile("logrus.log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666) if err == nil { log.Out = file } else { log.Info("failed to log to file") }*/ Mongo = log.WithFields(logrus.Fields{ "t": "mongo", }) Web = log.WithFields(logrus.Fields{ "t": "web", }) WebVoice = log.WithFields(logrus.Fields{ "t": "webVoice", }) WebMobile = log.WithFields(logrus.Fields{ "t": "webMobile", }) Minecraft = log.WithFields(logrus.Fields{ "t": "minecraft", }) }