question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Daily rotation is completely broken

See original GitHub issue

Specifying daily as the frequency is completely broken. It will create a new logfile every minute.

The culprit is here, which triggers every minute because getDate always returns the current minute for daily rotation.

As I find the code very hard to read and understand and the test coverage evidently isn’t sufficient, I’ve decided not to make a pull request - this would be likely to break some other piece of functionality.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
pdesterlichcommented, Apr 20, 2015

it’s not clearly documented, but if you set a date_format in options you can have a log file for each day

example:

var accessLogStream = require('file-stream-rotator').getStream({
  filename   : logDirectory + '/access-%DATE%.log',
  frequency  : 'daily',
  verbose    : false,
  date_format: 'YYYYMMDD'
});
0reactions
rogerccommented, Mar 7, 2017

not seeing any errors in latest release planned this week so closing this issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

A day on Earth is now shorter than 24 hours. Here's why
Earth is rotating on its axis faster than it has in a half-century -- implying that each day on the planet is now...
Read more >
Heroic Daily rotation Broken? - Blizzard Forums
The heroic dailies in Dalaran seem off. its been doing nothing but cycling between Halls of Stone (ew), Utgarde Keep, or Culling or...
Read more >
The Earth broke its record for the shortest day - The Independent
The planet completed a full spin on 29 June 2022 in 1.59 milliseconds shorter than 24 hours.
Read more >
Shortest day: Earth completes rotation in less than 24 hours ...
On July 29, the Earth broke its record for the shortest day. It completed rotating on its axis 1.50 milliseconds--little over one thousandth ......
Read more >
Earth Completes Rotation In Less Than 24-Hours, Smashes ...
On July 29, the Earth broke its record for the shortest day as it completed a full spin in 1.59 milliseconds less than...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found