functional-tester: plog for milli-second timestamp
Standard log package by default only prints out the second-scale so the 3rd party log feeder mixes the order of the events, which makes the debugging hard. This replaces it with capnslog and make them consistent with all other etcd log formats.
This commit is contained in:
@ -16,11 +16,14 @@ package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/coreos/etcd/Godeps/_workspace/src/github.com/coreos/pkg/capnslog"
|
||||
)
|
||||
|
||||
var plog = capnslog.NewPackageLogger("github.com/coreos/etcd", "etcd-agent")
|
||||
|
||||
func main() {
|
||||
etcdPath := flag.String("etcd-path", filepath.Join(os.Getenv("GOPATH"), "bin/etcd"), "the path to etcd binary")
|
||||
etcdLogPath := flag.String("etcd-log-path", "etcd.log", "the path to etcd log")
|
||||
@ -29,7 +32,7 @@ func main() {
|
||||
|
||||
a, err := newAgent(*etcdPath, *etcdLogPath)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
plog.Fatal(err)
|
||||
}
|
||||
a.serveRPC(*port)
|
||||
|
||||
|
Reference in New Issue
Block a user