I want to add timestamp to logs. What is the best way to achieve this?
相关问题
- npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs
- google-drive can't get push notifications
- I want to trace logs using a Macro multi parameter
- How to reimport module with ES6 import
- Error message 'No handlers could be found for
相关文章
- node连接远程oracle报错
- how do I log requests and responses for debugging
- How can make folder with Firebase Cloud Functions
- @angular-cli install fails with deprecated request
- node.js modify file data stream?
- How to resolve hostname to an ip address in node j
- Transactionally writing files in Node.js
- Log to node console or debug during webpack build
Sometimes default timestamp format can be not convenient for you. You can override it with your implementation.
Instead of
you can write
See https://github.com/winstonjs/winston#custom-log-format for the details