簡體   English   中英

溫斯頓模塊行為異常

[英]winston module not behaving properly

使用Winston處理node.js的日志記錄時如何更新日志文件。 下面是我嘗試的代碼。 僅在第一次將數據保存在日志文件中時。

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' });

我正在使用Node版本0.10.10和Winston 0.7.1

對此的任何幫助將非常有幫助。 謝謝

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

我使用0.10.24。現在適用於我

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM