Skip to content

Commit

Permalink
feat: fastify logger configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
pmstss committed Sep 27, 2024
1 parent 3727d5c commit 3dbc515
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
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

0 comments on commit 3dbc515

Please sign in to comment.