Skip to content

Commit 2277753

Browse files
committed
feat: ignore logs for checkHealth
1 parent 9396cf3 commit 2277753

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

app-routes.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ module.exports = (app) => {
2828

2929
const actions = [];
3030
actions.push((req, res, next) => {
31-
req._id = uuid();
32-
req.signature = `${req._id}-${def.controller}#${def.method}`;
33-
logger.info(`Started request handling, ${req.signature}`);
31+
if (def.method !== "checkHealth") {
32+
req._id = uuid();
33+
req.signature = `${req._id}-${def.controller}#${def.method}`;
34+
logger.info(`Started request handling, ${req.signature}`);
35+
}
3436
next();
3537
});
3638

@@ -109,10 +111,6 @@ module.exports = (app) => {
109111
});
110112
}
111113
actions.push(method);
112-
actions.push((req, res, next) => {
113-
logger.info(`Done request handling, ${req.signature}`);
114-
next();
115-
});
116114
app[verb](`/${config.API_VERSION}${path}`, helper.autoWrapExpress(actions));
117115
});
118116
});

src/services/ChallengeService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1420,7 +1420,7 @@ async function updateChallenge(currentUser, challengeId, data) {
14201420

14211421
// Remove fields from data that are not allowed to be updated and that match the existing challenge
14221422
data = sanitizeData(sanitizeChallenge(data), challenge);
1423-
logger.debug("Sanitized Data:", JSON.stringify(data));
1423+
logger.debug(`Sanitized Data: ${JSON.stringify(data)}`);
14241424

14251425
await validateChallengeUpdateRequest(currentUser, challenge, data);
14261426

0 commit comments

Comments
 (0)