我无法使winston记录器将日志写入stackdriver控制台。我将我的函数部署为 google firebase 函数(使用firebase deploy)。console日志记录工作正常,但我们在项目中没有使用这样的工具。
我尝试过的:
winston.add(require('@google-cloud/logging-winston')); winston.log('error', 'Winston error!');都添加了项目 ID projectId/服务帐户 JSON 凭证文件等参数keyFilename);请建议...我厌倦了实验(每次重新部署都需要时间)
我已阅读使用winston 包登录node.js 的文档。
我的问题:我是否需要将日志模块添加到需要logging..或温斯顿以某种方式拦截console.log和的每个页面console.error。
谢谢你的时间。