[SERVER-13493] support interoperability with Linux logrotate Created: 04/Apr/14  Updated: 02/Jun/14  Resolved: 09/Apr/14

Status: Closed
Project: Core Server
Component/s: Logging
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor - P4
Reporter: Bruce Lucas (Inactive) Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-4905 logRotate should conform to standard ... Closed
Related
Participants:

 Description   

Currently mongod doesn't work completely satisfactorily with Linux logrotate.The standard method of allowing logrotate to rename the file doesn't work because mongod continues writing to the open fd of the renamed file instead of to the new file. You can use the "copytruncate" option which causes logrotate to copy the current log file to the rotated file and then truncate the current log file to delete the old entries, but this a) requires that the file be copied instead of just renaming it and b) loses any log entries made between the copy and the truncate.

This could be fixed if there were some way to force mongod to close the current log file and open it again. Ideally this would be a signal (to simplify using it in a logrotate script), possibly SIGUSR1 with alternate semantics specified by a configuration option.



 Comments   
Comment by Eric Milkie [ 04/Apr/14 ]

SERVER-4905?

Generated at Thu Feb 08 03:31:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.