logs don't rotate

Bug #1452285 reported by Nate Finch
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Nate Finch
1.22
Fix Released
High
Nate Finch
1.23
Fix Released
High
Nate Finch
1.24
Fix Released
High
Nate Finch

Bug Description

We implemented log rotation almost a year ago using gopkg.in/natefinch/lumberjack.v2, but for some reason the logs do not seem to be rotating now.

Martin Packman (gz)
Changed in juju-core:
milestone: 1.24-beta1 → 1.25.0
Curtis Hovey (sinzui)
tags: added: logging
Nate Finch (natefinch)
Changed in juju-core:
status: In Progress → Fix Released
tags: added: cpec
tags: added: stakeholder
Revision history for this message
Nate Finch (natefinch) wrote :

Turns out, the problem was that we were setting juju's log output to two different targets: lumberjack and stderr. When the log rotation code was first written, we set it to stderr first and the lumberjack, so lumberack overrode the earlier setting. An unrelated refactoring in December 2014 moved the lumberjack code earlier in the startup codepath, causing stderr to be set as the log output second.

This was remedied by refactoring the logging code so we only ever set the log output once, and just make sure that when we do, we do it with the right thing.

Felipe Reyes (freyes)
tags: added: sts
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.