feat: Normalized server logging (#2567)
* feat: Normalize logging * Remove scattered console.error + Sentry.captureException * Remove mention of debug * cleanup dev output * Edge cases, docs * Refactor: Move logger, metrics, sentry under 'logging' folder. Trying to reduce the amount of things under generic 'utils' * cleanup, last few console calls
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
// @flow
|
||||
import debug from "debug";
|
||||
import Logger from "../../logging/logger";
|
||||
import mailer from "../../mailer";
|
||||
import {
|
||||
View,
|
||||
@ -12,8 +12,6 @@ import {
|
||||
import { Op } from "../../sequelize";
|
||||
import type { DocumentEvent, CollectionEvent, Event } from "../../types";
|
||||
|
||||
const log = debug("services");
|
||||
|
||||
export default class NotificationsProcessor {
|
||||
async on(event: Event) {
|
||||
switch (event.name) {
|
||||
@ -98,7 +96,8 @@ export default class NotificationsProcessor {
|
||||
});
|
||||
|
||||
if (view) {
|
||||
log(
|
||||
Logger.info(
|
||||
"processor",
|
||||
`suppressing notification to ${setting.userId} because update viewed`
|
||||
);
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user