[SERVER-5325] Rolling Log Files Created: 16/Mar/12 Updated: 03/Jul/17 Resolved: 16/Mar/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Logging |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Rasitha Wijesinghe | Assignee: | Eric Milkie |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Description |
|
Can mongod automatically rename old log files and start new ones without having to restart? If we can specify either a size or time (or both), once that threshold is reached, server should start logging to a new log file. If renaming old log files is not efficient, log file name can have the timestamp. This helps a lot when having to go through log files. If log files are too large, it becomes a nightmare to go through those. |
| Comments |
| Comment by Eric Milkie [ 16/Mar/12 ] |
|
Most users just write one line into a crontable to do scheduled log rotations; it's not typically a whole other process. |
| Comment by Rasitha Wijesinghe [ 16/Mar/12 ] |
|
Is there a reason it cannot happen automatically? It doesn't make a lot of sense to setup a whole other process just to do the log rotation. If we can specify a time frame in the configuration, can't mongod automatically run the log rotate command? |
| Comment by Eric Milkie [ 16/Mar/12 ] |
|
http://www.mongodb.org/display/DOCS/Logging#Logging-Rotatingthelogfiles You can't have it happen automatically, but you can set up something that runs on a schedule of your choosing that triggers mongod to rotate the log. |