won't work with log4js
zhangyu911013 opened this issue · 2 comments
zhangyu911013 commented
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);
zhangyu911013 commented
I think it's better to ask such questions at stackoverflow,so i'll close the issue.
Sorry for the interference..
wmertens commented
Ah yes indeed, but can you also link to the SO question so future searchers
can find the answer?
…On Thu, May 17, 2018 at 10:14 AM steveZhang ***@***.***> wrote:
I think it's better to ask such questions at stackoverflow,so i'll close
the issue.
Sorry for the interference..
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#25 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADWlgzxUmpIiyXD6U5x7toEh9kC2o1Zks5tzTFpgaJpZM4UBK25>
.