summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-01-08 15:07:08 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-01-08 15:07:08 +0900
commit8919e408e4a4a51c4f597c14670cedca6927da46 (patch)
treebd73b43261b5fa6880399797e0beafd10ef798b8
parente7ebdd8e244dac3c742e3e062d4a55768ecf8433 (diff)
bgpd: use json format by default for logging
"-p" option uses "plain" format. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--bgpd.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/bgpd.go b/bgpd.go
index 9c2b4c4f..0d466adb 100644
--- a/bgpd.go
+++ b/bgpd.go
@@ -41,7 +41,7 @@ func main() {
var opts struct {
ConfigFile string `short:"f" long:"config-file" description:"specifying a config file"`
LogLevel string `short:"l" long:"log-level" description:"specifying log level"`
- LogJson bool `short:"j" long:"log-json" description:"use json format for logging"`
+ LogPlain bool `short:"p" long:"log-plain" description:"use plain format for logging (json by default)"`
UseSyslog string `short:"s" long:"syslog" description:"use syslogd"`
}
_, err := flags.Parse(&opts)
@@ -78,7 +78,7 @@ func main() {
}
}
- if opts.LogJson {
+ if opts.LogPlain == false {
log.SetFormatter(&log.JSONFormatter{})
}