BIND 10 #1004: add logging option for 'every program'
BIND 10 Development
do-not-reply at isc.org
Mon Jun 27 10:51:00 UTC 2011
#1004: add logging option for 'every program'
-------------------------------------+-------------------------------------
Reporter: jelte | Owner: vorner
Type: task | Status: reviewing
Priority: major | Milestone:
Component: | Sprint-20110628
logging | Resolution:
Keywords: | Sensitive: 0
Defect Severity: N/A | Sub-Project: Core
Feature Depending on Ticket: | Estimated Difficulty: 0.0
Add Hours to Ticket: 0 | Total Hours: 0
Internal?: 0 |
-------------------------------------+-------------------------------------
Changes (by jelte):
* owner: jelte => vorner
Comment:
Replying to [comment:11 vorner]:
> Hello
>
> Good there are tests for the plugin now as well.
>
> I see only two minor things:
> * The condition looks really complicated, the negation of compound
expression makes it hard to read:
> {{{#!C++
> if (cur_name.length() > 0 && cur_name[0] == '*' &&
> !(cur_name.length() > 1 && cur_name[1] != '.')) {
> }}}
> Could it be made as positive with `||`?
sure
> * The way the JSON is copied looks less elegant than necessary. The
thing I don't like about it is it creates a deep copy of the JSON, while
shallow one could be enough. Since the toplevel element must be a
MapElement, we could typecast it to it and using a default copy
constructor of MapElement, create new one and use that one to replace the
one "name" subelement.
> I'm not sure this is more elegant, and the data will not be too deep
anyway, so I'll leave it up to you.
>
actually, i originally chose to use the json repr because i wanted a deep
copy, but indeed with an appropriate explanation, a shallow copy is
enough. We don't even need a cast for that (creating a new mapelement and
using setvalue works just as well, though i did have to fix a missing
const in data.h)
--
Ticket URL: <http://bind10.isc.org/ticket/1004#comment:12>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list