[SERVER-8160] The rotateLogs() function doesn't print errno when the rename() fails Created: 13/Jan/13  Updated: 15/Feb/13  Resolved: 13/Jan/13

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

Type: Bug Priority: Major - P3
Reporter: William Zola Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: logging
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-5727 log rotate() is missing a lot of erro... Closed
duplicates SERVER-7869 Display error code when logRotate is ... Closed
Operating System: ALL
Participants:

 Comments   
Comment by Tad Marshall [ 13/Jan/13 ]

See SERVER-7869: Display error code when logRotate is unable to rename log file

Comment by Eric Milkie [ 13/Jan/13 ]

SERVER-5727

Comment by William Zola [ 13/Jan/13 ]

From LoggingManager.rotate() in util/log.cpp:

        if (0 != rename(_path.c_str(), s.c_str())) {
            error() << "Failed to rename " << _path << " to " << s;
            return false;
        }

This code should print the value of errno, so that if the call fails at a user's site, it's possible to easily diagnose what went wrong.

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