Skip to content

Commit

Permalink
Add logs to Watchdog callbacks. (mozilla-services#4768)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenba committed Aug 22, 2018
1 parent 40ffd94 commit 09102ad
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/src/watchdog.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,12 @@ exports.handleResult = function(req) {
};

function handleNegative(record) {
mozlog.debug("watchdog-negative-match", {msg: `Watchdog submission ${record.id} is a negative match.`});
return db.update("UPDATE watchdog_submissions SET positive_result = FALSE WHERE id = $1", [record.id]);
}

function handlePositive(record) {
mozlog.warn("watchdog-positive-match", {msg: `Watchdog submission ${record.id} is a positive match.`});
return db.transaction(client => {
return db.queryWithClient(
client,
Expand Down

0 comments on commit 09102ad

Please sign in to comment.