mirror of
https://github.com/simon-ding/polaris.git
synced 2026-04-21 19:27:30 +08:00
feat: add log level setting
This commit is contained in:
@@ -6,6 +6,7 @@ const (
|
||||
SettingJacketUrl = "jacket_url"
|
||||
SettingJacketApiKey = "jacket_api_key"
|
||||
SettingDownloadDir = "download_dir"
|
||||
SettingLogLevel = "log_level"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
5
db/db.go
5
db/db.go
@@ -57,6 +57,11 @@ func (c *Client) init() {
|
||||
log.Infof("set default download dir")
|
||||
c.SetSetting(downloadDir, "/downloads")
|
||||
}
|
||||
logLevel := c.GetSetting(SettingLogLevel)
|
||||
if logLevel == "" {
|
||||
log.Infof("set default log level")
|
||||
c.SetSetting(SettingLogLevel, "info")
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Client) generateJwtSerectIfNotExist() {
|
||||
|
||||
Reference in New Issue
Block a user