对于托管在 Azure App Services 上的应用程序,你是否推荐使用像 bunyan 或 morgan 这样的记录器?

Do you recommend using loggers like bunyan or morgan for application hosted on Azure App Services

我有 Node.JS 个应用程序,我在我的应用程序中实现了 Morgan 和 Bunyan 记录器。

后来我在 Azure 应用服务上发布了我的应用程序,Azure 应用服务具有 Application Insights 和日志功能,它记录了我的应用程序上的所有错误,并提供了有关我的应用程序 API 调用状态的详细信息.. 。ETC。现在我想知道我们是否还需要在我们的应用程序中添加记录器,你有什么建议。谢谢。

如果您计划在 Azure 上部署 Node.js 代码,我建议您查看使用 Application Insights 的标准方法来满足您的日志记录需求:more info here

除非您想成为云不可知论者以最终部署在其他云提供商上,否则我会坚持使用标准方法而不添加额外的 modules/layers。

是的,据我所知,您可以在 node.js 应用程序中使用 Bunyan 作为记录器,并使用 Azure 存储来存储日志。

This blog说得好。本博客中提到的 Azure 网站是 Azure App Services 的早期名称。