bigbluebutton-Github/bigbluebutton-html5/imports/startup/server/logger.js
2019-08-02 10:20:06 -07:00

29 lines
617 B
JavaScript
Executable File

import { Meteor } from 'meteor/meteor';
import { createLogger, format, transports } from 'winston';
const LOG_CONFIG = Meteor.settings.private.serverLog || {};
const { level } = LOG_CONFIG;
const Logger = createLogger({
level,
format: format.combine(
format.colorize({ level: true }),
format.splat(),
format.simple(),
),
transports: [
// console logging
new transports.Console({
prettyPrint: false,
humanReadableUnhandledException: true,
colorize: true,
handleExceptions: true,
level,
}),
],
});
export default Logger;
export const logger = Logger;