package wrapplog

import (
	"os"

	"github.com/Sirupsen/logrus"
)

func init() {
	logrus.SetFormatter(&logrus.JSONFormatter{})
	logrus.SetOutput(os.Stdout)
}
package wrapplog

import (
	"os"
	"strings"

	"github.com/Sirupsen/logrus"
)

var jsonFormatter = logrus.JSONFormatter{}

type WrappFormatter struct{}

func init() {
	logrus.SetFormatter(&WrappFormatter{})
	logrus.SetOutput(os.Stdout)
}

// Format logs according to WEP-007
func (f *WrappFormatter) Format(entry *logrus.Entry) ([]byte, error) {
	jsonBytes, err := (&jsonFormatter).Format(entry)
	prefix := []byte(strings.ToUpper(entry.Level.String()) + " ")
	return append(prefix[:], jsonBytes[:]...), err
}

--- 
+++ 
@@ -2,23 +2,11 @@
 
 import (
 	"os"
-	"strings"
 
 	"github.com/Sirupsen/logrus"
 )
 
-var jsonFormatter = logrus.JSONFormatter{}
-
-type WrappFormatter struct{}
-
 func init() {
-	logrus.SetFormatter(&WrappFormatter{})
+	logrus.SetFormatter(&logrus.JSONFormatter{})
 	logrus.SetOutput(os.Stdout)
 }
-
-// Format logs according to WEP-007
-func (f *WrappFormatter) Format(entry *logrus.Entry) ([]byte, error) {
-	jsonBytes, err := (&jsonFormatter).Format(entry)
-	prefix := []byte(strings.ToUpper(entry.Level.String()) + " ")
-	return append(prefix[:], jsonBytes[:]...), err
-}
Update according to wep changes
