mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 04:10:20 +08:00
fix: Get logger configuration from app.conf file (#1907)
* feat: Get logger configuration from file * feat: Get logger configuration from file * Remove GetConfigLogs()
This commit is contained in:
@ -109,3 +109,19 @@ func TestGetConfigQuota(t *testing.T) {
|
||||
assert.Equal(t, scenery.expected, quota)
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetConfigLogs(t *testing.T) {
|
||||
scenarios := []struct {
|
||||
description string
|
||||
expected string
|
||||
}{
|
||||
{"Default log config", `{"filename": "logs/casdoor.log", "maxdays":99999, "perm":"0770"}`},
|
||||
}
|
||||
|
||||
err := beego.LoadAppConfig("ini", "app.conf")
|
||||
assert.Nil(t, err)
|
||||
for _, scenery := range scenarios {
|
||||
quota := GetConfigString("logConfig")
|
||||
assert.Equal(t, scenery.expected, quota)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user