diff --git a/go.mod b/go.mod index ebe97fed..a9f7c0c4 100644 --- a/go.mod +++ b/go.mod @@ -15,6 +15,7 @@ require ( github.com/mroth/weightedrand v0.4.1 github.com/shirou/gopsutil v3.21.9+incompatible github.com/sirupsen/logrus v1.8.1 + github.com/t-tomalak/logrus-easy-formatter v0.0.0-20190827215021-c074f06c5816 github.com/tidwall/gjson v1.10.2 github.com/wdvxdr1123/ZeroBot v1.3.2 modernc.org/sqlite v1.13.3 diff --git a/go.sum b/go.sum index 1bb9df70..3c8a0212 100644 --- a/go.sum +++ b/go.sum @@ -106,6 +106,7 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= +github.com/t-tomalak/logrus-easy-formatter v0.0.0-20190827215021-c074f06c5816 h1:J6v8awz+me+xeb/cUTotKgceAYouhIB3pjzgRd6IlGk= github.com/t-tomalak/logrus-easy-formatter v0.0.0-20190827215021-c074f06c5816/go.mod h1:tzym/CEb5jnFI+Q0k4Qq3+LvRF4gO3E2pxS8fHP8jcA= github.com/tdf1939/ZeroBot-Plugin-Gif v0.0.0-20210828060956-389b1dc33652/go.mod h1:bkxKi7un9gCDvUUZAiIJF6k90pyj8rmxiXLJkiHcsMY= github.com/tdf1939/img v0.0.0-20210827153520-90cb4e9580a3/go.mod h1:FgTEOcosTWrkOr7++gbtPSj1rX5loRWrf/AL+hm3Cnw= diff --git a/main_win.go b/main_win.go new file mode 100644 index 00000000..a1b5e146 --- /dev/null +++ b/main_win.go @@ -0,0 +1,15 @@ +//go:build windows +// +build windows + +package main + +import ( + "github.com/sirupsen/logrus" + easy "github.com/t-tomalak/logrus-easy-formatter" +) + +func init() { + logrus.SetFormatter(&easy.Formatter{ + LogFormat: "[%lvl%] %msg%\n", + }) +}