// New - Configures app logger
Configures app logger
// New - Configures app logger
func New(conf ConfLogger) (*logrus.Logger, error) {
	logger := logrus.New()
	if conf.Formatter == "json" {
		logger.SetFormatter(&logrus.JSONFormatter{})
	} else {
		logger.SetFormatter(&logrus.TextFormatter{})
	}
	lvl, err := logrus.ParseLevel(conf.Level)
	if err != nil {
		return nil, err
	}
	logger.SetLevel(lvl)
	logger.SetReportCaller(conf.ReportCaller)
	return logger, nil
}
func New ( conf ConfLogger ) ( * logrus . Logger , error ) { logger := logrus . New ( ) if conf . Formatter == " " { logger . SetFormatter ( & logrus . JSONFormatter { } ) } else { logger . SetFormatter ( & logrus . TextFormatter { } ) } lvl , err := logrus . ParseLevel ( conf . Level ) if err != nil { return nil , err } logger . SetLevel ( lvl ) logger . SetReportCaller ( conf . ReportCaller ) return logger , nil }
Configures app logger
Configures app logger
// Setting formatter // Setting log level // Setting report caller