add tracing, env config, dotenvy
bootstrap: tracing-subscriber with RUST_LOG env filter, ServerConfig from env vars (KFRAME_DATABASE_URL, KFRAME_TCP_ADDR, etc.), dotenvy for .env file loading. Replaced all println with tracing macros. tcp-server: replaced println with tracing::info/warn. Added .env.example and .gitignore for db files.
This commit is contained in:
8
.env.example
Normal file
8
.env.example
Normal file
@@ -0,0 +1,8 @@
|
||||
# K-Frame Server Configuration
|
||||
KFRAME_DATABASE_URL=sqlite:kframe.db?mode=rwc
|
||||
KFRAME_TCP_ADDR=0.0.0.0:2699
|
||||
KFRAME_HTTP_ADDR=0.0.0.0:3000
|
||||
KFRAME_POLL_INTERVAL_SECS=5
|
||||
|
||||
# Logging (tracing-subscriber)
|
||||
RUST_LOG=info,sqlx=warn
|
||||
Reference in New Issue
Block a user