Compare commits

..

2 Commits
v0.0.1 ... main

Author SHA1 Message Date
4d4c4aebca first comm 2024-10-02 07:55:12 +08:00
4d5976cd85 first comm 2024-10-01 06:21:20 +08:00
2 changed files with 3 additions and 1 deletions

View File

@ -5,5 +5,5 @@ Liteyuki Logger for Go, 用于轻雪项目统一日志格式
## 安装
```shell
go get -u github.com/liteyukistudio/go-logger
go get github.com/LiteyukiStudio/go-logger
```

View File

@ -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
}