BIND 10 #2988: check and report log4cplus rotation issues
BIND 10 Development
do-not-reply at isc.org
Tue Jun 11 20:28:41 UTC 2013
#2988: check and report log4cplus rotation issues
--------------------------------+-----------------------------------------
Reporter: jinmei | Owner:
Type: defect | Status: new
Priority: medium | Milestone: New Tasks
Component: logging | Resolution:
Keywords: | CVSS Scoring:
Sensitive: 0 | Defect Severity: N/A
Sub-Project: Core | Feature Depending on Ticket:
Estimated Difficulty: 2 | Add Hours to Ticket: 0
Total Hours: 0 | Internal?: 0
--------------------------------+-----------------------------------------
Comment (by jreed):
The patch I used is:
{{{
--- ./src/fileappender.cxx.orig 2013-06-07 11:43:19.000000000 -0500
+++ ./src/fileappender.cxx 2013-06-07 11:45:06.000000000 -0500
@@ -488,11 +488,13 @@
void
RollingFileAppender::append(const spi::InternalLoggingEvent& event)
{
- FileAppender::append(event);
+ // Rotate log file if needed before appending to it.
if(out.tellp() > maxFileSize) {
rollover(true);
}
+
+ FileAppender::append(event);
}
}}}
But this introduced test failures like:
{{{
[ RUN ] LoggerManagerTest.FileSizeRollover
logger_manager_unittest.cc:151: Failure
Failed
Unable to open the logging file ./bind10_logger_manager_test_8Cmo6l.2
logger_manager_unittest.cc:165: Failure
Value of: line.find(string(*i)) != string::npos
Actual: false
Expected: true
Expected to find LOG_DUPLICATE_NAMESPACE on line 1 of logging file
./bind10_logger_manager_test_8Cmo6l.1
logger_manager_unittest.cc:165: Failure
Value of: line.find(string(*i)) != string::npos
Actual: false
Expected: true
Expected to find LOG_DUPLICATE_NAMESPACE on line 1 of logging file
./bind10_logger_manager_test_8Cmo6l.2
logger_manager_unittest.cc:165: Failure
Value of: line.find(string(*i)) != string::npos
Actual: false
Expected: true
Expected to find LOG_NO_MESSAGE_TEXT on line 1 of logging file
./bind10_logger_manager_test_8Cmo6l.1
[ FAILED ] LoggerManagerTest.FileSizeRollover (10 ms)
}}}
--
Ticket URL: <http://bind10.isc.org/ticket/2988#comment:3>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list