diff options
author | Mike Yuan <me@yhndnzj.com> | 2024-07-31 19:51:23 +0200 |
---|---|---|
committer | Mike Yuan <me@yhndnzj.com> | 2024-07-31 21:40:28 +0200 |
commit | 8574b7940b982b50a67a1fb05b209fd7aed438eb (patch) | |
tree | 3f73c8fa783002dbe763dafb72793436264261d3 /src/core/unit.h | |
parent | core: clean up ambient capability logging (diff) | |
download | systemd-8574b7940b982b50a67a1fb05b209fd7aed438eb.tar.xz systemd-8574b7940b982b50a67a1fb05b209fd7aed438eb.zip |
core/unit: merge use of LOG_CONTEXT_SET_LOG_LEVEL into LOG_CONTEXT_PUSH_UNIT
No functional change, since LOG_CONTEXT_PUSH_UNIT is only used
in exec_spawn().
Diffstat (limited to 'src/core/unit.h')
-rw-r--r-- | src/core/unit.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/core/unit.h b/src/core/unit.h index 4c900430b4..115948cd26 100644 --- a/src/core/unit.h +++ b/src/core/unit.h @@ -1189,12 +1189,13 @@ typedef struct UnitForEachDependencyData { #define UNIT_FOREACH_DEPENDENCY(other, u, match_atom) \ _UNIT_FOREACH_DEPENDENCY(other, u, match_atom, UNIQ_T(data, UNIQ)) -#define _LOG_CONTEXT_PUSH_UNIT(unit, u, c) \ - const Unit *u = (unit); \ - const ExecContext *c = unit_get_exec_context(u); \ - LOG_CONTEXT_PUSH_KEY_VALUE(u->manager->unit_log_field, u->id); \ - LOG_CONTEXT_PUSH_KEY_VALUE(u->manager->invocation_log_field, u->invocation_id_string); \ - LOG_CONTEXT_PUSH_IOV(c ? c->log_extra_fields : NULL, c ? c->n_log_extra_fields : 0) +#define _LOG_CONTEXT_PUSH_UNIT(unit, u, c) \ + const Unit *u = (unit); \ + const ExecContext *c = unit_get_exec_context(u); \ + LOG_CONTEXT_PUSH_KEY_VALUE(u->manager->unit_log_field, u->id); \ + LOG_CONTEXT_PUSH_KEY_VALUE(u->manager->invocation_log_field, u->invocation_id_string); \ + LOG_CONTEXT_PUSH_IOV(c ? c->log_extra_fields : NULL, c ? c->n_log_extra_fields : 0); \ + LOG_CONTEXT_SET_LOG_LEVEL(c->log_level_max >= 0 ? c->log_level_max : log_get_max_level()) #define LOG_CONTEXT_PUSH_UNIT(unit) \ _LOG_CONTEXT_PUSH_UNIT(unit, UNIQ_T(u, UNIQ), UNIQ_T(c, UNIQ)) |