logging: fixup 4763486: implementation would parse 'date' instead of 'time' field in config

This commit is contained in:
Christian Schwarz 2017-11-15 11:14:20 +01:00
parent 476348689a
commit b576253ea8

View File

@ -139,7 +139,7 @@ func parseOutlet(i interface{}) (o logger.Outlet, level logger.Level, err error)
func parseStdoutOutlet(i interface{}, formatter EntryFormatter) (WriterOutlet, error) {
var in struct {
Date bool
Time bool
}
if err := mapstructure.Decode(i, &in); err != nil {
return WriterOutlet{}, errors.Wrap(err, "invalid structure for stdout outlet")
@ -147,7 +147,7 @@ func parseStdoutOutlet(i interface{}, formatter EntryFormatter) (WriterOutlet, e
flags := MetadataAll
writer := os.Stdout
if !isatty.IsTerminal(writer.Fd()) && !in.Date {
if !isatty.IsTerminal(writer.Fd()) && !in.Time {
flags &= ^MetadataTime
}