summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-07-25 08:18:29 -0600
committermo khan <mo@mokhan.ca>2025-07-25 08:18:29 -0600
commit106403fd8d3071dd8513661a110bedf85fb4591d (patch)
treea74cc17367ebdcc5fb883fe93ee003bf8c109cc4
parentf81a61b676d4d7aa058d5498bc0c76f5a533c16d (diff)
chore: extract LOG_LEVEL env var to tune logging
-rw-r--r--.env1
-rw-r--r--.runway/env-production.yml1
-rw-r--r--.runway/env-staging.yml1
-rw-r--r--Procfile2
-rwxr-xr-xbin/envoy-shim4
5 files changed, 6 insertions, 3 deletions
diff --git a/.env b/.env
index 41f0912..e4c8f51 100644
--- a/.env
+++ b/.env
@@ -1,6 +1,7 @@
APP_ENV=development
# AUTHZD_HOST=0.0.0.0:20000
HMAC_SESSION_SECRET=session_secret
+LOG_LEVEL=warn
OAUTH_CLIENT_ID=client_id
OAUTH_CLIENT_SECRET=client_secret
OIDC_ISSUER=https://gitlab.com
diff --git a/.runway/env-production.yml b/.runway/env-production.yml
index ba43963..a511122 100644
--- a/.runway/env-production.yml
+++ b/.runway/env-production.yml
@@ -1,5 +1,6 @@
APP_ENV: "production"
AUTHZD_HOST: "authzd.staging.runway.gitlab.net:443"
+LOG_LEVEL: "warn"
OAUTH_CLIENT_ID: "75656280b7ca60223b060b57c4eb98a8a324878531efeccafc1d25709dbee5c9"
OIDC_ISSUER: "https://gitlab.com"
ZED_ENDPOINT: ":50051"
diff --git a/.runway/env-staging.yml b/.runway/env-staging.yml
index 46aecc1..7d34db1 100644
--- a/.runway/env-staging.yml
+++ b/.runway/env-staging.yml
@@ -1,5 +1,6 @@
APP_ENV: "production"
AUTHZD_HOST: "authzd.staging.runway.gitlab.net:443"
+LOG_LEVEL: "info"
OAUTH_CLIENT_ID: "786e37c8d2207d200f735379ad52579c452948222f9affc7a45e74bd7074ad3c"
OIDC_ISSUER: "https://staging.gitlab.com"
ZED_ENDPOINT: ":50051"
diff --git a/Procfile b/Procfile
index 444538c..104aa2e 100644
--- a/Procfile
+++ b/Procfile
@@ -1,4 +1,4 @@
authzd: ./bin/authzd
envoy: ./bin/envoy-shim
sparkled: ./bin/sparkled
-spicedb: ./bin/spicedb serve --grpc-preshared-key $ZED_TOKEN --http-addr :8081 --grpc-addr :50051 --datastore-engine memory --log-level warn --log-format json --telemetry-endpoint "" --skip-release-check
+spicedb: ./bin/spicedb serve --grpc-preshared-key $ZED_TOKEN --http-addr :8081 --grpc-addr :50051 --datastore-engine memory --log-level $LOG_LEVEL --log-format json --telemetry-endpoint "" --skip-release-check
diff --git a/bin/envoy-shim b/bin/envoy-shim
index f358631..274369e 100755
--- a/bin/envoy-shim
+++ b/bin/envoy-shim
@@ -33,5 +33,5 @@ fi
exec envoy \
--base-id 0 \
--config-yaml "$yaml" \
- --log-level warn \
- --component-log-level admin:warn,connection:warn,ext_authz:info,grpc:info,health_checker:warn,http:warn,http2:warn,jwt:warn,oauth2:warn,router:warn,secret:warn,upstream:warn
+ --log-level "$LOG_LEVEL" \
+ --component-log-level admin:warn,connection:warn,ext_authz:info,grpc:warn,health_checker:warn,http:warn,http2:warn,jwt:warn,oauth2:warn,router:warn,secret:warn,upstream:warn