projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ed34d7
)
manager: swap order in which we ellipsize/escape sd_notify() messages for debugging
author
Lennart Poettering
<lennart@poettering.net>
Thu, 4 Jan 2018 20:00:10 +0000
(21:00 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 11 Jan 2018 14:12:16 +0000
(15:12 +0100)
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.
src/core/manager.c
patch
|
blob
|
history
diff --git
a/src/core/manager.c
b/src/core/manager.c
index
a9c4330
..
07809fe
100644
(file)
--- a/
src/core/manager.c
+++ b/
src/core/manager.c
@@
-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));
}
}