🧪 More detailed debug config

This commit is contained in:
LittleSheep 2024-03-23 00:41:32 +08:00
parent 36afe6ce3f
commit 1664fa62c4
4 changed files with 6 additions and 4 deletions

BIN
pkg/.DS_Store vendored

Binary file not shown.

View File

@ -21,7 +21,7 @@ func NewSource() error {
}, Logger: logger.New(&log.Logger, logger.Config{
Colorful: true,
IgnoreRecordNotFoundError: true,
LogLevel: lo.Ternary(viper.GetBool("debug"), logger.Info, logger.Silent),
LogLevel: lo.Ternary(viper.GetBool("debug.database"), logger.Info, logger.Silent),
})})
return err

View File

@ -29,7 +29,7 @@ func NewServer() {
JSONEncoder: jsoniter.ConfigCompatibleWithStandardLibrary.Marshal,
JSONDecoder: jsoniter.ConfigCompatibleWithStandardLibrary.Unmarshal,
BodyLimit: 50 * 1024 * 1024,
EnablePrintRoutes: viper.GetBool("debug"),
EnablePrintRoutes: viper.GetBool("debug.print_routes"),
})
A.Use(idempotency.New())

View File

@ -1,5 +1,3 @@
debug = true
name = "Solarplaza"
maintainer = "SmartSheep Studio"
@ -9,6 +7,10 @@ secret = "LtTjzAGFLshwXhN4ZD4nG5KlMv1MWcsvfv03TSZYnT1VhiAnLIZFTnHUwR0XhGgi"
content = "uploads"
[debug]
database = false
print_routes = false
[identity]
client_id = "solarplaza"
client_secret = "Z9k9AFTj^p"