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

16 lines
451 B
JavaScript
Raw Normal View History

2017-04-28 21:47:07 +08:00
import Logger from '/imports/startup/server/logger';
export default function (type, logDescription, logCode = 'was_not_provided', extraInfo = {}, userInfo = {}) {
2020-05-01 04:40:45 +08:00
const connectionId = this.connection.id;
const logContents = {
logCode,
logDescription,
2020-05-01 04:40:45 +08:00
connectionId,
extraInfo,
userInfo,
};
// If I don't pass message, logs will start with `undefined`
Logger.log({ message: JSON.stringify(logContents), level: type });
}