node.jsdockergulpdocker-composegulp-task

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?


Solution

  • 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/'));
    });