An useless log dir was created after calling new winston.transports.DailyRotateFile( options )
See original GitHub issuenew winston.transports.DailyRotateFile( {
dailyrotate: true,
filename: '/.../lib/modules/server/app/log/info-%DATE%.log',
datePattern: 'YYYY-MM-DD',
maxSize: '20m',
maxFiles: '30d',
level: 'info' }
} );
After calling the code above, an empty log dir would be created in /.../lib/server/
.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
NodeJS Logger: winston.transports.DailyRotateFile is not a ...
I'm writing a rest api with NodeJS and express and I'm using express-winston to log accesses ...
Read more >winstonjs/winston - Gitter
Is it possible to set up logs in such a way that the callee function uses the same logger that the caller function...
Read more >[Solved]-Winston daily rotate file maxSize is not working-node.js
Coding example for the question Winston daily rotate file maxSize is not working-node.js. ... var transport = new (winston.transports.DailyRotateFile)({ ...
Read more >Winston: A Logger for Just About Everything - Morioh
File({ filename: 'error.log', level: 'error' }), new winston.transports. ... You get started by creating a logger using winston.createLogger :
Read more >How to Get Started with Logging in Node.js - Better Stack
The most common way to log in Node.js is by using methods on the console module (such as log() ). It's adequate for...
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
I tried to write a sample, but at last, I found out the reason. It isn’t because of
winston-daily-rotate-file
it is because of the libraryfile-stream-rotator
that being used inwinston-daily-rotate-file
. It created a.audit.json
file for recoding a map of log files, and because I copied the directories, the.audit.json
hasn’t been rebuilt, it still has the old path in it, sofile-stream-rotator
makes some useless directories in the old path.Thank you for your patience.
Can this part of information about
.audit.json
file being created be added in the Wiki/README. It would help. I was facing a similar issue where theFileStreamRotator
returned a permission error to store logs at some obscure directory, since I was running the logger initially outside docker and then inside a docker container.