code refactor

This commit is contained in:
MaysWind
2020-12-23 01:24:44 +08:00
parent 62ef7cbcbe
commit b3962e8af9
35 changed files with 256 additions and 255 deletions
+2 -2
View File
@@ -41,13 +41,13 @@ func (f *LogFormatter) Format(entry *logrus.Entry) ([]byte, error) {
b.WriteString(entry.Message)
if requestId, exists := entry.Data[LOG_FIELD_REQUEST_ID]; exists {
if requestId, exists := entry.Data[logFieldRequestId]; exists {
b.WriteString(fmt.Sprintf(", r=%s", requestId))
}
b.WriteString("\n")
if extra, exists := entry.Data[LOG_FIELD_EXTRA]; exists {
if extra, exists := entry.Data[logFieldExtra]; exists {
b.WriteString(extra.(string))
}