]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/test/test-log.c
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)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 8 May 2017 02:48:24 +0000 (22:48 -0400)
commitff524019efda6d504dbdddbe5ba6aa3cffb2a7b4
tree2e1f8b7cecc4ad0ceb1d6618bf1ae269ea808e88
parent3e4a040c940d4e61f7c500a9bc31fdbd26407f87
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