【问题标题】:Loggly: Unable to receive logs from NodeJs with WinstonLoggly:无法使用 Winston 从 NodeJs 接收日志
【发布时间】:2017-12-26 05:33:26
【问题描述】:

我配置了有关documentation's page 的所有内容。

我的 Node 应用程序没有收到任何错误,但是我的应用程序没有收到任何登录日志。 我不知道问题出在哪里。

我在 config.js 中的代码:

var winston  = require('winston');
require('winston-loggly-bulk');

winston.add(winston.transports.Loggly, {
    inputToken: "aToken",
    subdomain: "aSubDomain",
    tags: ["Winston-NodeJS"],
    json:true
});

winston.log('info',"Hello World from Node.js!");

【问题讨论】:

    标签: javascript node.js logging loggly


    【解决方案1】:

    您的配置看起来不错。您是否检查过您使用的是来自https://YourSubdomain.loggly.com/tokens 而不是来自https://YourSubdomain.loggly.com/account/users/api/tokens 的正确令牌?两种令牌的使用方式不同,因此这可能是您在帐户中看不到任何日志的原因。

    【讨论】:

      猜你喜欢
      • 2021-10-15
      • 2019-06-15
      • 1970-01-01
      • 1970-01-01
      • 2012-12-06
      • 2015-01-18
      • 2021-04-26
      • 2020-06-27
      • 1970-01-01
      相关资源
      最近更新 更多