* 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
20 lines
595 B
JavaScript
20 lines
595 B
JavaScript
// @flow
|
|
import Logger from "../logging/logger";
|
|
export default class CollaborationLogger {
|
|
async onCreateDocument(data: { documentName: string }) {
|
|
Logger.info("collaboration", `Created document "${data.documentName}"`);
|
|
}
|
|
|
|
async onConnect(data: { documentName: string }) {
|
|
Logger.info("collaboration", `New connection to "${data.documentName}"`);
|
|
}
|
|
|
|
async onDisconnect(data: { documentName: string }) {
|
|
Logger.info("collaboration", `Connection to "${data.documentName}" closed`);
|
|
}
|
|
|
|
async onUpgrade() {
|
|
Logger.info("collaboration", "Upgrading connection");
|
|
}
|
|
}
|