简体   繁体   English

温斯顿模块行为异常

[英]winston module not behaving properly

How can I update log file when using Winston to handle logging for node.js. 使用Winston处理node.js的日志记录时如何更新日志文件。 Below is the code which I tried. 下面是我尝试的代码。 Only first time the data is getting saved in log file. 仅在第一次将数据保存在日志文件中时。

var logger = new (winston.Logger)({
   transports: [
      new (winston.transports.Console)(),
      new (winston.transports.File)({ filename: '2012-07-09.log' })
  ]
});

logger.log('info', 'Test Log Message', { anything: 'This is metadata' });

Im using Node version 0.10.10 and winston 0.7.1 我正在使用Node版本0.10.10和Winston 0.7.1

Any help on this will be really helpful. 对此的任何帮助将非常有帮助。 Thanks 谢谢

Update to winston 7.2 https://github.com/mozilla/persona/commit/ecd695c52d9edbfa46b710ec8832c9fdf890ae16 更新到Winston 7.2 https://github.com/mozilla/persona/commit/ecd695c52d9edbfa46b710ec8832c9fdf890ae16

I use 0.10.24 .It works for me now 我使用0.10.24。现在适用于我

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM