I used default format to print log, but there is only log level info, log msg which I wrote and some fields I added, but where is the time field, isn't it added automatically?
kind of, it shows how long the program has been running. can set a new formatter to show the full timestamp
logrus.Info("duration")
formatter := &logrus.TextFormatter{
FullTimestamp: true,
}
logrus.SetFormatter(formatter)
logrus.Info("timestamp")
output
INFO[0000] duration
INFO[2016-09-23T21:55:52-04:00] timestamp
@daniel-huckins that's what I want, thank you!!!
Most helpful comment
kind of, it shows how long the program has been running. can set a new formatter to show the full timestamp
output