Skip to content

Commit

Permalink
Merge pull request #1420 from exogee-technology/chore/add-additional-…
Browse files Browse the repository at this point in the history
…logging

Chore / Add Additional Database logging
  • Loading branch information
thekevinbrown authored Dec 4, 2024
2 parents d5eae4b + 849b279 commit 38ae836
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/packages/mikroorm/src/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,13 @@ class DatabaseImplementation {

logger.trace(`${params.entities?.length}x entities`);

// Log the params, obfuscating the password used for the connection if there is one.
const { password, ...rest } = params;
logger.info(
{ connectionParams: rest },
'Connecting to database using MikroORM. Note: connectionParams have password removed for security.'
);

const orm = await MikroORM.init({
validateRequired: false, // Since v5, new entities are validated on runtime (just before executing insert queries), based on the entity metadata
contextName: connectionOptions?.connectionManagerId ?? 'default',
Expand Down

0 comments on commit 38ae836

Please sign in to comment.