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:
Gyu-Ho Lee
2016-02-17 18:39:05 -08:00
parent 40d3e0daff
commit 7aa62ec595
6 changed files with 59 additions and 58 deletions

View File

@ -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)