BIND 10 #1622: Ensure multiple processes log to same file when files are being rolled

BIND 10 Development do-not-reply at isc.org
Wed May 29 04:05:24 UTC 2013


#1622: Ensure multiple processes log to same file when files are being rolled
-------------------------------------+-------------------------------------
            Reporter:  stephen       |                        Owner:
                Type:  defect        |                       Status:  new
            Priority:  medium        |                    Milestone:
           Component:  logging       |  Sprint-20130611
            Keywords:                |                   Resolution:
           Sensitive:  0             |                 CVSS Scoring:
         Sub-Project:  Core          |              Defect Severity:
Estimated Difficulty:  6             |  Medium
         Total Hours:  0             |  Feature Depending on Ticket:
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------

Comment (by jinmei):

 It's not surprising to me log4cplus 1.1.0 doesn't work without using
 its own file lock:

 {{{#!cpp
     if (useLockFile)
     {
 ...
         // Recheck the condition as there is a window where another
         // process can rollover the file before us.

         helpers::FileInfo fi;
         if (getFileInfo (&fi, filename) == -1
             || fi.size < maxFileSize)
         {
             // The file has already been rolled by another
             // process. Just reopen with the new file.

             // Open it up again.
             open (std::ios::out | std::ios::ate);
             loglog_opening_result (loglog, out, filename);

             return;
         }
     }
 }}}

-- 
Ticket URL: <http://bind10.isc.org/ticket/1622#comment:22>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list