Winston Transport File - zippedArchive option doesn't work correctly
See original GitHub issueIf you use the following transport file:
new (winston.transports.File)({
level: 'silly',
filename: './test.log',
maxsize: 500000,
maxFiles: 4,
format: format.combine(
format.splat(),
format.label({ label: 'test' }),
format.timestamp(),
format.prettyPrint(),
format.printf( log => {
return '[ ' + log.timestamp + ' ][ ' + log.level + ' ][ '+ log.label + ' ] ' + log.message;
})
), tailable: true,
zippedArchive: true,
exitOnError: false
}) );
The resulting “test.log” is zipped.
This is wrong since the documentation tells that:
zippedArchive: If true, all log files but the current one will be zipped.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:17
- Comments:23 (1 by maintainers)
Top Results From Across the Web
winston - npm
A multi-transport async logging library for Node.js. ... Awaiting logs to be written in winston; Working with multiple Loggers in winston.
Read more >Winston not displaying error details - node.js - Stack Overflow
It is a module that I am using to log some information to a file and some to a mysql database. require('dotenv').config(); const ......
Read more >A multi-transport async logging library for Node.js
Logger.prototype.add (transport, options, created); function winston. ... this might not be exactly correct, // but probably close-enough for purposes of ...
Read more >How to use Winston Daily Rotate File Logger in NodeJs
Winston daily rotate file ensure that we do not have all log being written ... And also daily rotate file function with option...
Read more >Complete Winston Logger Guide With Hands-on Examples
The open-source Winston logger helps take a load off our shoulders ... 30 transports options, which include logging out into a single file, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Still happening on 3.3.3 😔
@masoudltf: you are right, the latest winston (3.1.0) doesn’t zip any file but only adds the .gz extension. Infact, it seems there is no method which inflates the logs, only the Zlib instance