From 8e42f69a7011cdb90e87065754b6eac6c1a2e5c2 Mon Sep 17 00:00:00 2001 From: Drew Bednar Date: Sun, 19 Jan 2025 13:32:06 -0500 Subject: [PATCH] Use DEBUG log level in dev --- .air.toml | 4 ++-- Makefile | 1 + cmd/ratchetd/main.go | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.air.toml b/.air.toml index d435769..d6e480a 100644 --- a/.air.toml +++ b/.air.toml @@ -3,7 +3,7 @@ testdata_dir = "testdata" tmp_dir = "tmp" [build] - args_bin = [] + args_bin = ["-logging=DEBUG"] bin = "./tmp/main" cmd = "go build -o ./tmp/main cmd/ratchetd/main.go" delay = 1000 @@ -22,7 +22,7 @@ tmp_dir = "tmp" poll_interval = 0 post_cmd = [] pre_cmd = [] - rerun = false + rerun = false rerun_delay = 500 send_interrupt = false stop_on_error = false diff --git a/Makefile b/Makefile index af1cca1..f50ca24 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,7 @@ run-migrate: # Checks system dependencies needed to run the local dev environment check-system-deps: @echo "Checking system dependencies..." + @command -v air > /dev/null || (echo "Missing air command. go install github.com/air-verse/air@latest"; exit 1) @command -v sqlite3 > /dev/null || (echo "Missing sqlite3 command. brew install sqlite"; exit 1) @command -v migrate > /dev/null || (echo "Missing migrate command. go install -tags 'sqlite3' github.com/golang-migrate/migrate/v4/cmd/migrate@latest"; exit 1) @echo "System dependencies fulfilled 👍" \ No newline at end of file diff --git a/cmd/ratchetd/main.go b/cmd/ratchetd/main.go index c8c918c..94a50e0 100644 --- a/cmd/ratchetd/main.go +++ b/cmd/ratchetd/main.go @@ -24,7 +24,7 @@ func main() { // Parse command line options addr := flag.String("addr", "0.0.0.0", "HTTP network address") port := flag.String("port", "5001", "HTTP port") - logLevel := flag.String("logging", "DEBUG", "Logging Level. Valid values [INFO, DEBUG, WARN, ERROR].") + logLevel := flag.String("logging", "INFO", "Logging Level. Valid values [INFO, DEBUG, WARN, ERROR].") dbPath := flag.String("database", "./ratchet.db", "A path to a sqlite3 database") // must call parse or all values will be the defaults flag.Parse()