From 1664fa62c4928f19f06fe9b5f301a7c55d143e54 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sat, 23 Mar 2024 00:41:32 +0800 Subject: [PATCH] :test_tube: More detailed debug config --- pkg/.DS_Store | Bin 6148 -> 0 bytes pkg/database/source.go | 2 +- pkg/server/startup.go | 2 +- settings.toml | 6 ++++-- 4 files changed, 6 insertions(+), 4 deletions(-) delete mode 100644 pkg/.DS_Store diff --git a/pkg/.DS_Store b/pkg/.DS_Store deleted file mode 100644 index 7a0810886d55587af36646b9626118305611eab2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~K?=e^3`G;|qTr@Wm$UHz-e3?tK`-D!5kV>l>UNIqPbLUf*CO%*$)98o3FUJRDH7`XtWU8s5ohKej0(KmsH{0wh2J zKSaRpZCE?2%18nvKmtz!_I*fj(;Ql=`lkcIM*wJpvK!VuOF)wqpgFWuMFplYJ!rJ5 zk0Dm~c4&%oIkZ%*?V>S!XgpbMih*fu7fncDnq3%3fCNSarZw;E{@=hq&HtkorX)ZD ze?~x?b-!NWrQ&XVdp)afqiX8{hx&1Zm!AM6b`{UzZrD$@facIr6%`nN1RMhc34E2n E1Dk&m&Hw-a diff --git a/pkg/database/source.go b/pkg/database/source.go index 5fdb79d..7602278 100644 --- a/pkg/database/source.go +++ b/pkg/database/source.go @@ -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 diff --git a/pkg/server/startup.go b/pkg/server/startup.go index 97b0da8..f3159af 100644 --- a/pkg/server/startup.go +++ b/pkg/server/startup.go @@ -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()) diff --git a/settings.toml b/settings.toml index 3e69e10..d1227fe 100644 --- a/settings.toml +++ b/settings.toml @@ -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"