From 8919e408e4a4a51c4f597c14670cedca6927da46 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Thu, 8 Jan 2015 15:07:08 +0900 Subject: bgpd: use json format by default for logging "-p" option uses "plain" format. Signed-off-by: FUJITA Tomonori --- bgpd.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bgpd.go') 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{}) } -- cgit v1.2.3