Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structured log: replace ngaut/log with logrus #612

Merged
merged 21 commits into from
Apr 24, 2017
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/pd-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
"os/signal"
"syscall"

log "github.com/Sirupsen/logrus"
"github.com/grpc-ecosystem/go-grpc-prometheus"
"github.com/juju/errors"
"github.com/ngaut/log"
"github.com/pingcap/pd/pkg/metricutil"
"github.com/pingcap/pd/server"
"github.com/pingcap/pd/server/api"
Expand Down
12 changes: 7 additions & 5 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ import:
version: ~1.1.0
- package: github.com/gorilla/mux
version: ~1.1.0
- package: github.com/gorilla/websocket
version: a836c37014dbbf0d1e871d04531b851fcbdeb22d
- package: github.com/grpc-ecosystem/grpc-gateway
version: 84398b94e188ee336f307779b57b3aa91af7063c
subpackages:
Expand All @@ -120,7 +118,7 @@ import:
- package: github.com/pingcap/check
version: ce8a2f822ab1e245a4eefcef2996531c79c943f1
- package: github.com/pingcap/kvproto
version: 0811f27579a1070546c4d5496bf3f6fa62cec750
version: 0811f27579a1070546c4d5496bf3f6fa62cec750
subpackages:
- pkg/coprocessor
- pkg/eraftpb
Expand Down Expand Up @@ -201,11 +199,15 @@ import:
repo: https://github.com/spf13/cobra.git
vcs: git
- package: github.com/chzyer/readline
version: c914be64f07d9998f52bf0d598ec26d457168c0f
version: c914be64f07d9998f52bf0d598ec26d457168c0f
- package: github.com/dustin/go-humanize
version: 7a41df006ff9af79a29f0ffa9c5f21fbe6314a2d
- package: github.com/elazarl/go-bindata-assetfs
- package: github.com/ngaut/systimemon
version: c2ca1c75c6af5556eb6ce67994120adf12f2ccef
- package: github.com/montanaflynn/stats
version: f8cd06f93c6c1b06028caafb88b540fc820f77c1
- package: github.com/Sirupsen/logrus
version: v0.11.5
- package: gopkg.in/natefinch/lumberjack.v2
version: v2
2 changes: 1 addition & 1 deletion pkg/etcdutil/etcdutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ import (
"strings"
"time"

log "github.com/Sirupsen/logrus"
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/etcdserver"
"github.com/coreos/etcd/pkg/types"
"github.com/juju/errors"
"github.com/ngaut/log"
"github.com/pingcap/pd/pkg/apiutil"
"golang.org/x/net/context"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/metricutil/metricutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"time"
"unicode"

"github.com/ngaut/log"
log "github.com/Sirupsen/logrus"
"github.com/pingcap/pd/pkg/typeutil"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/push"
Expand Down
2 changes: 1 addition & 1 deletion server/balancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"math"
"time"

log "github.com/Sirupsen/logrus"
"github.com/montanaflynn/stats"
"github.com/ngaut/log"
"github.com/pingcap/kvproto/pkg/metapb"
)

Expand Down
2 changes: 1 addition & 1 deletion server/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (
"sync"
"time"

log "github.com/Sirupsen/logrus"
"github.com/gogo/protobuf/proto"
"github.com/juju/errors"
"github.com/ngaut/log"
"github.com/pingcap/kvproto/pkg/metapb"
"github.com/pingcap/kvproto/pkg/pdpb"
)
Expand Down
2 changes: 1 addition & 1 deletion server/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"sync"
"time"

log "github.com/Sirupsen/logrus"
"github.com/coreos/etcd/clientv3"
"github.com/juju/errors"
"github.com/ngaut/log"
"github.com/pingcap/kvproto/pkg/metapb"
"github.com/pingcap/kvproto/pkg/pdpb"
)
Expand Down
2 changes: 1 addition & 1 deletion server/cluster_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ package server
import (
"bytes"

log "github.com/Sirupsen/logrus"
"github.com/gogo/protobuf/proto"
"github.com/juju/errors"
"github.com/ngaut/log"
"github.com/pingcap/kvproto/pkg/metapb"
"github.com/pingcap/kvproto/pkg/pdpb"
)
Expand Down
2 changes: 1 addition & 1 deletion server/coordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"sync"
"time"

log "github.com/Sirupsen/logrus"
"github.com/juju/errors"
"github.com/ngaut/log"
"github.com/pingcap/kvproto/pkg/pdpb"
"golang.org/x/net/context"
)
Expand Down
2 changes: 1 addition & 1 deletion server/grpc_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"fmt"
"io"

log "github.com/Sirupsen/logrus"
"github.com/juju/errors"
"github.com/ngaut/log"
"github.com/pingcap/kvproto/pkg/metapb"
"github.com/pingcap/kvproto/pkg/pdpb"
"golang.org/x/net/context"
Expand Down
2 changes: 1 addition & 1 deletion server/id.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import (
"path"
"sync"

log "github.com/Sirupsen/logrus"
"github.com/coreos/etcd/clientv3"
"github.com/juju/errors"
"github.com/ngaut/log"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion server/kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import (
"path"
"time"

log "github.com/Sirupsen/logrus"
"github.com/coreos/etcd/clientv3"
"github.com/gogo/protobuf/proto"
"github.com/juju/errors"
"github.com/ngaut/log"
"github.com/pingcap/kvproto/pkg/metapb"
"golang.org/x/net/context"
)
Expand Down
2 changes: 1 addition & 1 deletion server/leader.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import (

"strings"

log "github.com/Sirupsen/logrus"
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/mvcc/mvccpb"
"github.com/juju/errors"
"github.com/ngaut/log"
"github.com/pingcap/kvproto/pkg/pdpb"
"golang.org/x/net/context"
)
Expand Down
2 changes: 1 addition & 1 deletion server/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"fmt"
"time"

"github.com/ngaut/log"
log "github.com/Sirupsen/logrus"
"github.com/pingcap/kvproto/pkg/metapb"
"github.com/pingcap/kvproto/pkg/pdpb"
)
Expand Down
2 changes: 1 addition & 1 deletion server/region_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"sync"
"time"

"github.com/ngaut/log"
log "github.com/Sirupsen/logrus"
)

type cacheItem struct {
Expand Down
2 changes: 1 addition & 1 deletion server/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"fmt"
"math"

log "github.com/Sirupsen/logrus"
"github.com/juju/errors"
"github.com/ngaut/log"
"github.com/pingcap/kvproto/pkg/metapb"
)

Expand Down
2 changes: 1 addition & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ import (
"sync/atomic"
"time"

log "github.com/Sirupsen/logrus"
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/embed"
"github.com/coreos/etcd/pkg/types"
"github.com/juju/errors"
"github.com/ngaut/log"
"github.com/ngaut/systimemon"
"github.com/pingcap/kvproto/pkg/pdpb"
"github.com/pingcap/pd/pkg/etcdutil"
Expand Down
2 changes: 1 addition & 1 deletion server/tso.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (
"sync/atomic"
"time"

log "github.com/Sirupsen/logrus"
"github.com/coreos/etcd/clientv3"
"github.com/juju/errors"
"github.com/ngaut/log"
"github.com/pingcap/kvproto/pkg/pdpb"
)

Expand Down
Loading