[SERVER-43631] "--logRotate reopen --logappend" truncates instead of appending during log rotation Created: 25/Sep/19 Updated: 06/Dec/22 Resolved: 05/Mar/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Logging |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Gabriel Russell (Inactive) | Assignee: | DO NOT USE - Backlog - Dev Tools |
| Resolution: | Won't Fix | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Developer Tools
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Case: | (copied to CRM) | ||||||||
| Description |
|
Even though --logRotate repoen demands that users also supply --logappend, the actual value of --logappend is not used in the reopen during log rotation. Instead of requiring people to supply --logappend, we should just do the reopens in append mode when doing "reopen" log rotations. |
| Comments |
| Comment by Gabriel Russell (Inactive) [ 25/Sep/19 ] |
|
Further more, I think that "--logRotate reopen" and "--logappend" should fully be synonymous. Log rotation should have two modes. "renames on log rotation and on startup" or "never renames and always opens in append mode". The logger should never open in truncation mode, in any configuration. After renames, we should open in O_EXCL mode. Log rotation and process start up should act largely the same. Currently with --logRotate rename and "--logappend" process start up will not cause a rename, but log rotation does. --logRotate rename should cause existing files to get renamed on start up and "--logappend" should have no effect on it. |