Task #4131
closedReplace NamePrefixList::writeLog with NamePrefixList::operator<<
0%
Description
Currently NamePrefixList has a function writeLog
that is essentially the operator<< function. Instead, it should be removed and any time that's used should be replaced with operator<<.
Updated by Nicholas Gordon over 7 years ago
- Subject changed from Replace NexthopList::writeLog with NexthopList::operator<< to Replace NamePrefixList::writeLog with NamePrefixList::operator<<
- Description updated (diff)
Updated by Nicholas Gordon over 7 years ago
Something that I haven't thought of is the macro scoping writeLog
affords us. That is, replacing writeLog
with operator<<
means that those objects will be logged as part of the calling object.
I would argue that for data types (NamePrefixList, NexthopList, and others), this is desired behavior; enabling logging for an object gives you the logs for that module, which includes any of the data that it uses. Enabling logging for that data type gives you logs about the internal calls of that data type.
I am currently proceeding as normal, but I thought to note this reasonably-important shift.
Updated by Nicholas Gordon over 7 years ago
- Status changed from In Progress to Code review
Updated by Nicholas Gordon over 7 years ago
- Status changed from Code review to Closed