0

我已经有 AngularJS - Node.js 应用程序在本地运行,在我的代码中写入后,我可以在浏览器上看到所有级别的日志:console.log/info/error

在 dockerize 我的应用程序并运行 docker image (docker-compose up) 后,在我的浏览器控制台上,我只能看到console.info日志。

问题:如何在我的浏览器中使用 docker 镜像中的应用程序来实现所有级别的日志(我最需要 console.log)?

4

1 回答 1

0

我发现出了什么问题——我的一位同事添加了 gulp 任务以仅选择生产中的 INFO 日志:

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/'));
});
于 2018-05-21T06:25:58.327 回答