Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix logger info context #145

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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