diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-01-08 15:07:08 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-01-08 15:07:08 +0900 |
commit | 8919e408e4a4a51c4f597c14670cedca6927da46 (patch) | |
tree | bd73b43261b5fa6880399797e0beafd10ef798b8 /bgpd.go | |
parent | e7ebdd8e244dac3c742e3e062d4a55768ecf8433 (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>
Diffstat (limited to 'bgpd.go')
-rw-r--r-- | bgpd.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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{}) } |