Log active configuration on startup
Assisted-by: Claude Opus 4.6 via Claude Code
change ywmqtrywqqsmtmwrwmykzqokvnpmsmyy
commit d6acad48fff857a1c1e0ad380ab952210c32e76d
author Alpha Chen <alpha@kejadlen.dev>
date
parent rsvqnvux
diff --git a/BACKLOG.md b/BACKLOG.md
index 46e88e4..5b10f90 100644
--- a/BACKLOG.md
+++ b/BACKLOG.md
@@ -24,3 +24,4 @@
 - Steep
 - Fix pages triggering from release
 - Improve the diff page to highlight differences
+- Status endpoint with debug information
diff --git a/config.ru b/config.ru
index 2e45a76..a34f0cc 100644
--- a/config.ru
+++ b/config.ru
@@ -4,6 +4,8 @@ $LOAD_PATH.unshift(File.expand_path("lib", __dir__))
 
 require_relative "lib/ketchup/web"
 
+$stderr.puts CONFIG
+
 if CONFIG.sentry
   require "sentry-ruby"
 
diff --git a/lib/ketchup/config.rb b/lib/ketchup/config.rb
index 3f5db7f..88e505e 100644
--- a/lib/ketchup/config.rb
+++ b/lib/ketchup/config.rb
@@ -9,6 +9,13 @@ Config = Data.define(:database_url, :sentry, :default_user) do
     end
   end
 
+  def to_s
+    parts = ["database=#{database_url}"]
+    parts << "sentry=#{sentry.env || "on"}" if sentry
+    parts << "default_user=#{default_user.login}" if default_user
+    "Config(#{parts.join(", ")})"
+  end
+
   def self.from_env(env = ENV)
     sentry_dsn = env["SENTRY_DSN"]
     default_user = env["DEFAULT_USER"]