chiark / gitweb /
basic/log: split max log level into multiple "realms"
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 23 Feb 2017 03:57:34 +0000 (22:57 -0500)
committerSven Eden <yamakuzure@gmx.net>
Tue, 25 Jul 2017 07:44:34 +0000 (09:44 +0200)
commit7a65c7a2257c398113531ee614cda06ea007146c
tree53a3f313cdca87d9939abc77f9b55daec725ecc7
parenteaa952024d64e2e8211eb8861ad7141ad2f10b6d
basic/log: split max log level into multiple "realms"

The single log level is split into an array of log levels. Which index in the
array is used can be determined for each compilation unit separately by setting
a macro before including log.h. All compilation units use the same index
(LOG_REALM_SYSTEMD), so there should be no functional change.

v2:
- the "realm" is squished into the level (upper bits that are not used by
  priority or facility), and unsquished later in functions in log.c.

v3:
- rename REALM_PLUS_LEVEL to LOG_REALM_PLUS_LEVEL and REALM to LOG_REALM_REMOVE_LEVEL.
src/basic/log.c
src/basic/log.h
src/test/test-log.c