[systemd-devel] Shedding some legacy naming: syslog "priority"
lennart at poettering.net
Mon Feb 4 13:09:59 PST 2013
On Thu, 31.01.13 22:59, David Strauss (david at davidstrauss.net) wrote:
> 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.
We tried to stick to the syslog vocabulary there, and that's even more
fucked up than you suggest: sometimes "priority" refers to the
combination of log level + log facility, and sometimes only the
former... It's entirely chaotic...
Now I wonder what's the bigger benefit here: reusing existing
terminology, or having more correct terminology...
If we choose the latter, would "verbosity" really be the best choice? I
am not a native english speaker, but to me this sounds much broader than
"priority" or "level" do?
Maybe call it "7-minus-priority" or so? ;-)
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel