Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

251
Views
Winston-daily-rotate ignores maxFile size

I am currently trying to set the maxSize in my winston daily rotate file, but the file always reaches a size of 121 kb and then later creates another file no matter what value is set for the maxSize here is the code I'm usin

            const transport = new winston.transports.DailyRotateFile({
            filename: '%DATE%_log_file.txt',
            dirname: path.join(__dirname, '../../', 'logs'),
            datePattern: 'YYYY-MM-DD-mm',
            maxSize: '20m',
            maxFiles: '2d'
          });
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The problem was having minutes in date format. Since my code runs for longer than a minute the transport updates the filename which in turn creates another log file since the time has changed.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!