Skip to content

Commit

Permalink
[RND-628] Switch to pino logger, either console or file logging not b…
Browse files Browse the repository at this point in the history
…oth (#286)
  • Loading branch information
bradbanister authored Aug 14, 2023
1 parent e021cd2 commit a4ffe05
Show file tree
Hide file tree
Showing 20 changed files with 455 additions and 163 deletions.
2 changes: 1 addition & 1 deletion Meadowlark-js/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OWN_OAUTH_CLIENT_ID_FOR_CLIENT_AUTH=meadowlark_verify-only_key_1
OWN_OAUTH_CLIENT_SECRET_FOR_CLIENT_AUTH=meadowlark_verify-only_secret_1
OAUTH_SERVER_ENDPOINT_FOR_OWN_TOKEN_REQUEST=http://localhost:3000/local/oauth/token
OAUTH_SERVER_ENDPOINT_FOR_TOKEN_VERIFICATION=http://localhost:3000/local/oauth/verify
IS_LOCAL=true
LOG_PRETTY_PRINT=true

#### Authorization Server options
# Configurable authorization store plugin - set to an npm package name
Expand Down
11 changes: 10 additions & 1 deletion Meadowlark-js/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@
"${workspaceRoot}\\tests\\config\\integration\\jest.config.js",
"backends/meadowlark-mongodb-backend/test/integration"
]
}
},
{
"name": "Run with ts-node",
"type": "node",
"request": "launch",
"args": ["${relativeFile}"],
"runtimeArgs": ["-r", "ts-node/register"],
"cwd": "${workspaceRoot}",
"internalConsoleOptions": "openOnSessionStart"
},
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ export async function queryDocuments(request: QueryRequest, client: Client): Pro
},
};

Logger.debug(`${moduleName}.queryDocuments queryDocuments executing query: ${JSON.stringify(query)}`, traceId);

if (isDebugEnabled()) {
Logger.debug(`${moduleName}.queryDocuments queryDocuments executing query: ${JSON.stringify(query)}`, traceId);
}
const body = await performDslQuery(
client,
indexFromResourceInfo(resourceInfo),
Expand Down
4 changes: 2 additions & 2 deletions Meadowlark-js/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ services:
FASTIFY_NUM_THREADS: ${FASTIFY_NUM_THREADS:-10}
MEADOWLARK_STAGE: ${MEADOWLARK_STAGE:-local}
LOG_LEVEL: ${LOG_LEVEL:-info}
IS_LOCAL: ${IS_LOCAL:-false}
LOG_PRETTY_PRINT: ${LOG_PRETTY_PRINT:-false}
AUTHORIZATION_STORE_PLUGIN: "${AUTHORIZATION_STORE_PLUGIN:-@edfi/meadowlark-mongodb-backend}"
BEGIN_ALLOWED_SCHOOL_YEAR: ${BEGIN_ALLOWED_SCHOOL_YEAR:-2022}
END_ALLOWED_SCHOOL_YEAR: ${END_ALLOWED_SCHOOL_YEAR:-2034}
Expand All @@ -39,7 +39,7 @@ services:
POSTGRES_HOST: ${POSTGRES_HOST:-postgres}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-abcdefgh1!}
SAVE_LOG_TO_FILE: true
LOG_TO_FILE: true
restart: unless-stopped
healthcheck:
test: curl -s http://localhost:3000/local >/dev/null || exit 1
Expand Down
Loading

0 comments on commit a4ffe05

Please sign in to comment.