Skip to content

Commit

Permalink
Merge pull request #145 from destinygg/logger-context-fix
Browse files Browse the repository at this point in the history
Fix logger info context
  • Loading branch information
11k authored Jan 22, 2024
2 parents cfa2e27 + d2ac913 commit 0778b94
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/services/dgg-rolling-chat-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ChatCache {
this.tombStoneMap = {};
this.startTombStoneInterval();

this.logger.info('Config loaded for Chat Cache:', config);
this.logger.info(config, 'Config loaded for Chat Cache');
}

startTombStoneInterval() {
Expand Down Expand Up @@ -86,7 +86,7 @@ class ChatCache {
return;
}
this.messageMatching.getLinks(message).forEach((link) => {
this.logger.info('Cached viewer url:', { user, url: link.hostname + link.pathname, message });
this.logger.info({ user, url: link.hostname + link.pathname, message }, 'Cached viewer url');
if (!_.has(this.viewerUrlMap, user)) this.viewerUrlMap[user] = [];
this.viewerUrlMap[user].push({
url: link.hostname + link.pathname,
Expand Down
2 changes: 1 addition & 1 deletion lib/services/spam-detection.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class SpamDetection {
this.longWordAllowedSpaces = 4;
this.messageUrlSpamCount = config.messageUrlSpamCount || 3;

this.logger.info('Config loaded for Spam Detection:', config);
this.logger.info(config, 'Config loaded for Spam Detection');
}

// Checks whether there's a large number of non ascii characters
Expand Down

0 comments on commit 0778b94

Please sign in to comment.