chore: init log package (#606)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
@@ -1,27 +1,15 @@
|
||||
package status
|
||||
|
||||
import (
|
||||
"log"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/appleboy/gorush/config"
|
||||
"github.com/appleboy/gorush/logx"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
cfg, _ := config.LoadConf()
|
||||
if err := logx.InitLog(
|
||||
cfg.Log.AccessLevel,
|
||||
cfg.Log.AccessLog,
|
||||
cfg.Log.ErrorLevel,
|
||||
cfg.Log.ErrorLog,
|
||||
); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
m.Run()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user