diff options
author | Thomas Haller <thaller@redhat.com> | 2016-01-26 14:04:15 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-01-26 14:10:56 +0100 |
commit | ea112ed8213268617c8caa8432fdb051d8acdbda (patch) | |
tree | 66542cc5906833d65638a871d42334e60e2d23f0 | |
parent | 8029f59e4fcefe9786fb79d04ede5ea10e3c33c2 (diff) | |
download | NetworkManager-ea112ed8213268617c8caa8432fdb051d8acdbda.tar.gz |
dispatcher: adjust logging output for dispatcher events
Previously, we would log messages like:
#3 'pre-up' [tun0]: new request (1 scripts)
Journald interprets the "#" prefix as a severity level and
highlights them.
-rw-r--r-- | callouts/nm-dispatcher.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/callouts/nm-dispatcher.c b/callouts/nm-dispatcher.c index a635e21685..a0201ff4c1 100644 --- a/callouts/nm-dispatcher.c +++ b/callouts/nm-dispatcher.c @@ -141,7 +141,7 @@ struct Request { #define __LOG_print(print_cmd, _request, _script, ...) \ G_STMT_START { \ nm_assert ((_request) && (!(_script) || (_script)->request == (_request))); \ - print_cmd ("#%u '%s'%s%s%s%s%s%s: " _NM_UTILS_MACRO_FIRST (__VA_ARGS__), \ + print_cmd ("req:%u '%s'%s%s%s%s%s%s: " _NM_UTILS_MACRO_FIRST (__VA_ARGS__), \ (_request)->request_id, \ (_request)->action, \ (_request)->iface ? " [" : "", \ @@ -161,7 +161,7 @@ struct Request { if (!__request) \ __request = __script->request; \ nm_assert (__request && (!__script || __script->request == __request)); \ - if ((log_always) || __request->debug) { \ + if ((log_always) || _LOG_R_D_enabled (__request)) { \ if (FALSE) { \ /* g_message() alone does not warn about invalid format. Add a dummy printf() statement to * get a compiler warning about wrong format. */ \ |