Skip to content

Commit 0778b94

Browse files
authored
Merge pull request #145 from destinygg/logger-context-fix
Fix logger info context
2 parents cfa2e27 + d2ac913 commit 0778b94

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/services/dgg-rolling-chat-cache.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ChatCache {
2424
this.tombStoneMap = {};
2525
this.startTombStoneInterval();
2626

27-
this.logger.info('Config loaded for Chat Cache:', config);
27+
this.logger.info(config, 'Config loaded for Chat Cache');
2828
}
2929

3030
startTombStoneInterval() {
@@ -86,7 +86,7 @@ class ChatCache {
8686
return;
8787
}
8888
this.messageMatching.getLinks(message).forEach((link) => {
89-
this.logger.info('Cached viewer url:', { user, url: link.hostname + link.pathname, message });
89+
this.logger.info({ user, url: link.hostname + link.pathname, message }, 'Cached viewer url');
9090
if (!_.has(this.viewerUrlMap, user)) this.viewerUrlMap[user] = [];
9191
this.viewerUrlMap[user].push({
9292
url: link.hostname + link.pathname,

lib/services/spam-detection.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class SpamDetection {
3030
this.longWordAllowedSpaces = 4;
3131
this.messageUrlSpamCount = config.messageUrlSpamCount || 3;
3232

33-
this.logger.info('Config loaded for Spam Detection:', config);
33+
this.logger.info(config, 'Config loaded for Spam Detection');
3434
}
3535

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

0 commit comments

Comments
 (0)