diff --git a/dashboard/dashboard.go b/dashboard/dashboard.go index 63aca1cd7d..55c2548691 100644 --- a/dashboard/dashboard.go +++ b/dashboard/dashboard.go @@ -32,6 +32,8 @@ import ( "sync/atomic" "time" + "io" + "github.com/elastic/gosigar" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" @@ -40,7 +42,6 @@ import ( "github.com/ethereum/go-ethereum/rpc" "github.com/mohae/deepcopy" "golang.org/x/net/websocket" - "io" ) const ( diff --git a/dashboard/log.go b/dashboard/log.go index 9bf7b6c9dd..d8116826ab 100644 --- a/dashboard/log.go +++ b/dashboard/log.go @@ -19,15 +19,16 @@ package dashboard import ( "bytes" "encoding/json" - "github.com/ethereum/go-ethereum/log" - "github.com/mohae/deepcopy" - "github.com/rjeczalik/notify" "io/ioutil" "os" "path/filepath" "regexp" "sort" "time" + + "github.com/ethereum/go-ethereum/log" + "github.com/mohae/deepcopy" + "github.com/rjeczalik/notify" ) var emptyChunk = json.RawMessage("[]") diff --git a/log/handler.go b/log/handler.go index 62480922ce..2287e8d614 100644 --- a/log/handler.go +++ b/log/handler.go @@ -8,11 +8,12 @@ import ( "reflect" "sync" - "github.com/go-stack/stack" "io/ioutil" - "regexp" "path/filepath" + "regexp" "strings" + + "github.com/go-stack/stack" ) // Handler defines where and how log records are written. @@ -147,7 +148,7 @@ func RotatingFileHandler(path string, limit uint, formatter Format) (Handler, er last-- } var counter *countingWriter - if last >= 0 && files[last].Size() < int64(limit){ + if last >= 0 && files[last].Size() < int64(limit) { // Open the last file, and continue to write into it until it's size reaches the limit. if counter, err = prepFile(filepath.Join(path, files[last].Name())); err != nil { return nil, err