Skip to content

Commit df224b9

Browse files
committed
log color
1 parent 75977d9 commit df224b9

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

main.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ import (
1818
)
1919

2020
func init() {
21-
customFormatter := new(log.TextFormatter)
22-
customFormatter.TimestampFormat = "2006-01-02 15:04:05"
23-
customFormatter.FullTimestamp = true
21+
customFormatter := &log.TextFormatter{
22+
TimestampFormat: "2006-01-02 15:04:05",
23+
FullTimestamp: true,
24+
ForceColors: true,
25+
}
2426
log.SetFormatter(customFormatter)
2527
}
2628

service/bot/bot.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ package bot
22

33
import (
44
"fmt"
5-
"github.com/Mrs4s/MiraiGo/utils"
65
"io/ioutil"
76
"time"
87

98
"github.com/Mrs4s/MiraiGo/client"
9+
"github.com/Mrs4s/MiraiGo/utils"
1010
"github.com/ProtobufBot/Go-Mirai-Client/pkg/util"
1111
"github.com/fanliao/go-promise"
1212
log "github.com/sirupsen/logrus"

0 commit comments

Comments
 (0)