Skip to content

Commit

Permalink
(log) updating logrus library (TykTechnologies#2454)
Browse files Browse the repository at this point in the history
- As per title - Updated logrus package
- updating evalphobia
- updating gemnasium graylog hook
- updating logrus-logstash-hook
- removing unused dependencies
- no need to escape json from msg
- JSVM log message now contains prefix - and logger no longer leaves erroneous space at the end
- Fixes issue where `TextFormatter` shows log as seconds since start, rather than timestamp.
  • Loading branch information
asoorm authored and buger committed Aug 12, 2019
1 parent d3fc15b commit d80ee5b
Show file tree
Hide file tree
Showing 487 changed files with 156,075 additions and 223,094 deletions.
2 changes: 1 addition & 1 deletion certs/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"strings"
"time"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"
cache "github.com/pmylund/go-cache"
)

Expand Down
2 changes: 1 addition & 1 deletion cli/importer/importer.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"strings"

log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"

kingpin "gopkg.in/alecthomas/kingpin.v2"

Expand Down
2 changes: 1 addition & 1 deletion coprocess/coprocess_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/golang/protobuf/proto"
"github.com/justinas/alice"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"

"github.com/TykTechnologies/tyk/apidef"
"github.com/TykTechnologies/tyk/coprocess"
Expand Down
2 changes: 1 addition & 1 deletion dnscache/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/TykTechnologies/tyk/config"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"

"github.com/TykTechnologies/tyk/log"
)
Expand Down
2 changes: 1 addition & 1 deletion dnscache/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"fmt"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"
cache "github.com/pmylund/go-cache"
)

Expand Down
2 changes: 1 addition & 1 deletion gateway/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import (
"sync"
"time"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"
"github.com/gorilla/mux"
uuid "github.com/satori/go.uuid"
"golang.org/x/crypto/bcrypt"
Expand Down
2 changes: 1 addition & 1 deletion gateway/api_definition.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/TykTechnologies/tyk/headers"
"github.com/TykTechnologies/tyk/rpc"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"
circuit "github.com/rubyist/circuitbreaker"

"github.com/TykTechnologies/gojsonschema"
Expand Down
2 changes: 1 addition & 1 deletion gateway/api_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"strconv"
"strings"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"
"github.com/gorilla/mux"
"github.com/justinas/alice"

Expand Down
2 changes: 1 addition & 1 deletion gateway/auth_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/TykTechnologies/tyk/user"
uuid "github.com/satori/go.uuid"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"
)

// AuthorisationHandler is used to validate a session key,
Expand Down
2 changes: 1 addition & 1 deletion gateway/coprocess.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"time"
"unicode/utf8"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"

"github.com/TykTechnologies/tyk/apidef"
"github.com/TykTechnologies/tyk/config"
Expand Down
2 changes: 1 addition & 1 deletion gateway/coprocess_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package gateway
import "C"

import (
"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"

"github.com/TykTechnologies/tyk/apidef"
"github.com/TykTechnologies/tyk/storage"
Expand Down
2 changes: 1 addition & 1 deletion gateway/coprocess_bundle.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gateway

import (
"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"

"github.com/TykTechnologies/goverify"
"github.com/TykTechnologies/tyk/apidef"
Expand Down
2 changes: 1 addition & 1 deletion gateway/coprocess_dummy.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package gateway
import (
"net/http"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"

"github.com/TykTechnologies/tyk/apidef"
"github.com/TykTechnologies/tyk/config"
Expand Down
2 changes: 1 addition & 1 deletion gateway/coprocess_grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"net/url"
"time"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
"google.golang.org/grpc"

Expand Down
2 changes: 1 addition & 1 deletion gateway/coprocess_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package gateway
import (
"encoding/json"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"

"github.com/TykTechnologies/tyk/coprocess"
"github.com/TykTechnologies/tyk/user"
Expand Down
2 changes: 1 addition & 1 deletion gateway/coprocess_id_extractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"
"time"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"
"github.com/mitchellh/mapstructure"
xmlpath "gopkg.in/xmlpath.v2"

Expand Down
2 changes: 1 addition & 1 deletion gateway/coprocess_lua.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ import (
"path/filepath"
"unsafe"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"

"github.com/TykTechnologies/tyk/apidef"
"github.com/TykTechnologies/tyk/coprocess"
Expand Down
2 changes: 1 addition & 1 deletion gateway/coprocess_python.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ import (
"sync"
"unsafe"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"

"github.com/TykTechnologies/tyk/apidef"
"github.com/TykTechnologies/tyk/config"
Expand Down
2 changes: 1 addition & 1 deletion gateway/distributed_rate_limiter.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"time"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"

"github.com/TykTechnologies/drl"
"github.com/TykTechnologies/tyk/config"
Expand Down
2 changes: 1 addition & 1 deletion gateway/event_handler_webhooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"strings"
"time"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"

"github.com/TykTechnologies/tyk/apidef"
"github.com/TykTechnologies/tyk/config"
Expand Down
2 changes: 1 addition & 1 deletion gateway/event_system.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"time"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"
circuit "github.com/rubyist/circuitbreaker"

"github.com/TykTechnologies/tyk/apidef"
Expand Down
2 changes: 1 addition & 1 deletion gateway/event_system_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"

"github.com/TykTechnologies/tyk/apidef"
"github.com/TykTechnologies/tyk/config"
Expand Down
2 changes: 1 addition & 1 deletion gateway/handler_websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"net/url"
"strings"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"

"github.com/TykTechnologies/tyk/headers"
"github.com/TykTechnologies/tyk/request"
Expand Down
2 changes: 1 addition & 1 deletion gateway/host_checker_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"sync"
"time"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"
uuid "github.com/satori/go.uuid"
msgpack "gopkg.in/vmihailenco/msgpack.v2"

Expand Down
2 changes: 1 addition & 1 deletion gateway/le_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"rsc.io/letsencrypt"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"

"github.com/TykTechnologies/tyk/config"
"github.com/TykTechnologies/tyk/storage"
Expand Down
2 changes: 1 addition & 1 deletion gateway/log_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package gateway
import (
"net/http"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"

"github.com/TykTechnologies/tyk/request"

Expand Down
2 changes: 1 addition & 1 deletion gateway/log_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"net/http/httptest"
"testing"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"

"github.com/TykTechnologies/tyk/config"
)
Expand Down
2 changes: 1 addition & 1 deletion gateway/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strconv"
"time"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"
"github.com/gocraft/health"
"github.com/justinas/alice"
newrelic "github.com/newrelic/go-agent"
Expand Down
2 changes: 1 addition & 1 deletion gateway/multi_target_proxy_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http"
"net/url"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"
)

type MultiTargetProxy struct {
Expand Down
2 changes: 1 addition & 1 deletion gateway/mw_basic_auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"
"time"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"
cache "github.com/pmylund/go-cache"
"golang.org/x/crypto/bcrypt"
"golang.org/x/sync/singleflight"
Expand Down
2 changes: 1 addition & 1 deletion gateway/mw_go_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"time"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"

"github.com/TykTechnologies/tyk/goplugin"
)
Expand Down
2 changes: 1 addition & 1 deletion gateway/mw_hmac.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"strings"
"time"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"

"github.com/TykTechnologies/tyk/apidef"
"github.com/TykTechnologies/tyk/headers"
Expand Down
2 changes: 1 addition & 1 deletion gateway/mw_js_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"github.com/TykTechnologies/tyk/config"
"github.com/TykTechnologies/tyk/user"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"
)

// Lets the user override and return a response from middleware
Expand Down
8 changes: 4 additions & 4 deletions gateway/mw_js_plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"
"time"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"
prefixed "github.com/x-cray/logrus-prefixed-formatter"

"github.com/TykTechnologies/tyk/apidef"
Expand Down Expand Up @@ -38,10 +38,10 @@ log('{"x": "y"}')
rawlog("foo")
rawlog('{"x": "y"}')
`
// note how the logger leaves spaces at the end

want := []string{
`time=TIME level=info msg=foo type=log-msg `,
`time=TIME level=info msg="{\"x\": \"y\"}" type=log-msg `,
`time=TIME level=info msg=foo prefix=jsvm type=log-msg`,
`time=TIME level=info msg="{"x": "y"}" prefix=jsvm type=log-msg`,
`foo`,
`{"x": "y"}`,
}
Expand Down
2 changes: 1 addition & 1 deletion gateway/mw_openid.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http"
"sync"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"
jwt "github.com/dgrijalva/jwt-go"

"github.com/TykTechnologies/openid2go/openid"
Expand Down
2 changes: 1 addition & 1 deletion gateway/mw_request_size_limit.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http"
"strconv"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"

"github.com/TykTechnologies/tyk/apidef"
"github.com/TykTechnologies/tyk/headers"
Expand Down
2 changes: 1 addition & 1 deletion gateway/mw_strip_auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/url"
"strings"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"
)

type StripAuth struct {
Expand Down
2 changes: 1 addition & 1 deletion gateway/mw_transform_jq.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"io/ioutil"
"net/http"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"

"github.com/TykTechnologies/tyk/apidef"
)
Expand Down
2 changes: 1 addition & 1 deletion gateway/mw_url_rewrite.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"strconv"
"strings"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"

"github.com/TykTechnologies/tyk/apidef"
"github.com/TykTechnologies/tyk/ctx"
Expand Down
2 changes: 1 addition & 1 deletion gateway/mw_virtual_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/TykTechnologies/tyk/config"
"github.com/TykTechnologies/tyk/user"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"
)

// RequestObject is marshalled to JSON string and passed into JSON middleware
Expand Down
2 changes: 1 addition & 1 deletion gateway/newrelic.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strconv"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"
"github.com/gocraft/health"
"github.com/gorilla/mux"
newrelic "github.com/newrelic/go-agent"
Expand Down
2 changes: 1 addition & 1 deletion gateway/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/TykTechnologies/tyk/rpc"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"

"github.com/TykTechnologies/tyk/user"
)
Expand Down
Loading

0 comments on commit d80ee5b

Please sign in to comment.