Skip to content

Commit

Permalink
Cached env variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
radekmie committed Aug 13, 2022
1 parent e0b349f commit d2ef148
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/mongo/oplog_v2_converter.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ function flattenObjectInto(target, source, prefix) {
}
}

const logDebugMessages = !!process.env.OPLOG_CONVERTER_DEBUG;

function convertOplogDiff(oplogEntry, diff, prefix) {
if (process.env.OPLOG_CONVERTER_DEBUG) {
if (logDebugMessages) {
console.log(`convertOplogDiff(${JSON.stringify(oplogEntry)}, ${JSON.stringify(diff)}, ${JSON.stringify(prefix)})`);
}

Expand Down

0 comments on commit d2ef148

Please sign in to comment.