[systemd-devel] Shedding some legacy naming: syslog "priority"
David Strauss
david at davidstrauss.net
Thu Jan 31 22:59:37 PST 2013
Before I spend time rolling a patch, what are the thoughts on renaming
the "priority" arguments to something like "verbosity"? This change
would not alter the function signature, only the naming and
documentation. We would continue to use syslog's constants.
"Priority" is confusing while developing because the numeric values
are the opposite of semantic. LOG_EMERG is, unarguably, a higher
priority to deliver and display than a LOG_DEBUG message. Yet,
LOG_DEBUG has "priority" seven while LOG_EMERG has "priority" zero.
Try writing a conditional that allows the proper messages through
based on the verbosity setting for the application. Even once it's
right, it looks wrong on every follow-up code review because, at
higher levels of verbosity, the "maximum priority" gets raised.
--
David Strauss
| david at davidstrauss.net
| +1 512 577 5827 [mobile]
More information about the systemd-devel
mailing list