mirror of
https://github.com/LiteyukiStudio/go-logger.git
synced 2025-01-31 07:33:01 +08:00
✨ first comm
This commit is contained in:
parent
4d5976cd85
commit
4d4c4aebca
@ -80,6 +80,8 @@ func (f *LiteyukiFormatter) Format(entry *logrus.Entry) ([]byte, error) {
|
||||
}
|
||||
levelText := Color(color, "["+logLevel+"]")
|
||||
// 格式化日志信息并添加颜色
|
||||
// 去除message两端的【】
|
||||
message = message[1 : len(message)-1]
|
||||
b.WriteString(fmt.Sprintf("%s %s %s\n", timeText, levelText, message))
|
||||
return b.Bytes(), nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user