tree-wide: use LOG_PRI() and LOG_FAC()

This commit is contained in:
Yu Watanabe
2024-05-12 09:49:45 +09:00
parent 82c2214539
commit c1db424db5
8 changed files with 22 additions and 16 deletions
+4 -4
View File
@@ -396,7 +396,7 @@ void log_forget_fds(void) {
}
void log_set_max_level(int level) {
assert(level == LOG_NULL || (level & LOG_PRIMASK) == level);
assert(level == LOG_NULL || LOG_PRI(level) == level);
log_max_level = level;
@@ -788,7 +788,7 @@ int log_dispatch_internal(
return -ERRNO_VALUE(error);
/* Patch in LOG_DAEMON facility if necessary */
if ((level & LOG_FACMASK) == 0)
if (LOG_FAC(level) == 0)
level |= log_facility;
if (open_when_needed)
@@ -1077,7 +1077,7 @@ int log_struct_internal(
log_target == LOG_TARGET_NULL)
return -ERRNO_VALUE(error);
if ((level & LOG_FACMASK) == 0)
if (LOG_FAC(level) == 0)
level |= log_facility;
if (IN_SET(log_target,
@@ -1180,7 +1180,7 @@ int log_struct_iovec_internal(
log_target == LOG_TARGET_NULL)
return -ERRNO_VALUE(error);
if ((level & LOG_FACMASK) == 0)
if (LOG_FAC(level) == 0)
level |= log_facility;
if (IN_SET(log_target, LOG_TARGET_AUTO,