bigbluebutton-Github/bigbluebutton-html5/imports/api/log-client/server/methods/logClient.js

16 lines
451 B
JavaScript
Executable File

import Logger from '/imports/startup/server/logger';
export default function (type, logDescription, logCode = 'was_not_provided', extraInfo = {}, userInfo = {}) {
const connectionId = this.connection.id;
const logContents = {
logCode,
logDescription,
connectionId,
extraInfo,
userInfo,
};
// If I don't pass message, logs will start with `undefined`
Logger.log({ message: JSON.stringify(logContents), level: type });
}