mirror of
https://github.com/systemd/systemd.git
synced 2024-11-07 09:56:51 +03:00
manager: swap order in which we ellipsize/escape sd_notify() messages for debugging
If we have to chose between truncated escape sequences and strings exploded to 4 times the desried length by fully escaping, prefer the latter. It's for debug only, hence doesn't really matter much.
This commit is contained in:
parent
1ed34d75d4
commit
da5fb86100
@ -1897,9 +1897,10 @@ static void manager_invoke_notify_message(Manager *m, Unit *u, pid_t pid, const
|
||||
else if (DEBUG_LOGGING) {
|
||||
_cleanup_free_ char *x = NULL, *y = NULL;
|
||||
|
||||
x = cescape(buf);
|
||||
x = ellipsize(buf, 20, 90);
|
||||
if (x)
|
||||
y = ellipsize(x, 20, 90);
|
||||
y = cescape(x);
|
||||
|
||||
log_unit_debug(u, "Got notification message \"%s\", ignoring.", strnull(y));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user