简体   繁体   中英

How to increase log level of Node.js app on Docker image?

I already have AngularJS - Node.js app running localy and I can see logs of all levels on my browser after write in my code: console.log/info/error .

After dockerize my app and run docker image (docker-compose up), on my browser console I can see only console.info logs.

Question : How to achive all levels of logs (i need console.log the most) in my browser using app inside docker image?

I found what was wrong - one of my colleague added gulp task to select only INFO logs on production:

gulp.task('ngconstant:prod', function () {
return ngConstant({
    name: 'myApp',
    constants: {
        VERSION: config.version,
        DEBUG_INFO_ENABLED: false  << this flag must be true
    },
    template: config.constantTemplate,
    stream: true
})
    .pipe(rename('app.constants.js'))
    .pipe(gulp.dest(config.app + 'app/'));
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM