Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fastify logger configuration #412

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ JWK_PUBLIC_JSON=config/keys/jwk.pub.json
JKU_URL=https://raw.githubusercontent.com/NeuraLegion/brokencrystals/development/config/keys/jku.json
X5U_URL=https://raw.githubusercontent.com/NeuraLegion/brokencrystals/development/config/keys/x509.crt

FASTIFY_LOGGER=true
FASTIFY_LOG_LEVEL=warn

KEYCLOAK_SERVER_URI=https://auth.qa.brokencrystals.com/auth
KEYCLOAK_REALM=brokencrystals
KEYCLOAK_ADMIN_CLIENT_ID=admin-cli
Expand Down
4 changes: 4 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ async function bootstrap() {
https.globalAgent.maxSockets = Infinity;

const server = fastify({
logger:
process.env.FASTIFY_LOGGER === 'true'
? { level: process.env.FASTIFY_LOG_LEVEL || 'warn' }
: false,
trustProxy: true,
onProtoPoisoning: 'ignore',
https:
Expand Down