ericclemmons/start-server-webpack-plugin

won't work with log4js

zhangyu911013 opened this issue · 2 comments

As the server starts,all the logs generated by log4js are not displayed on the terminal while displayed when using 'node server.js' to start the server.
here's the logger wrapper js.

import { log4js as logConfig } from 'config';
import * as log4js from 'log4js'

log4js.configure(logConfig);

const logger = log4js.getLogger('console');
console.log = logger.info.bind(logger);
console.debug = logger.debug.bind(logger);
console.error = logger.error.bind(logger);

export default category => log4js.getLogger(category);

I think it's better to ask such questions at stackoverflow,so i'll close the issue.
Sorry for the interference..