6
- 所有日志统一格式
目前有些级别的日志有文件名和行数内容输出,比如error级别日志,有些级别的日志无文件名和行数内容输出,例如
{"@timestamp":"2020-10-25T18:39:21.376+08","level":"slow","content":"hello slow world"}
{"@timestamp":"2020-10-25T18:39:21.376+08","level":"stat","content":"hello stat world"}
{"@timestamp":"2020-10-25T18:39:21.376+08","level":"info","duration":"61000.0ms","content":"hello"}
{"@timestamp":"2020-10-25T18:39:21.376+08","level":"error","duration":"61000.0ms","content":"logging.go:28 hello"}
{"@timestamp":"2020-10-25T18:39:21.376+08","level":"error","duration":"1000.0ms","content":"logging.go:10 world"}
建议所有日志统一添加文件名以及行数
- 建议类似zap添加debug级别的日志