diff options
| author | Michael Biebl <biebl@debian.org> | 2021-02-18 18:54:58 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2021-02-18 18:54:58 +0100 |
| commit | eca19fa2272137cfd38135376f8cbf6d0a2f2187 (patch) | |
| tree | 36d3cdb47cd2b3b367dced642667479007ffaf62 /libnm/nm-libnm-utils.c | |
| parent | 16df93361dd8829fa730e08ce96650b499a59f70 (diff) | |
| parent | 3a56bce6c0ea7ba0fe269520547740783b342e0d (diff) | |
Update upstream source from tag 'upstream/1.30.0'
Update to upstream version '1.30.0' with Debian dir e4e3c5986af4d47930d9e35ac7d8bc6c70bd1dd9
Diffstat (limited to 'libnm/nm-libnm-utils.c')
| -rw-r--r-- | libnm/nm-libnm-utils.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libnm/nm-libnm-utils.c b/libnm/nm-libnm-utils.c index 1fb6a47c..1000e04d 100644 --- a/libnm/nm-libnm-utils.c +++ b/libnm/nm-libnm-utils.c @@ -46,6 +46,7 @@ _nml_dbus_log(NMLDBusLogLevel level, gboolean use_stdout, const char *fmt, ...) va_list args; const char * prefix = ""; gint64 ts; + pid_t pid; /* we only call _nml_dbus_log() after nml_dbus_log_enabled(), which already does * an atomic access to the variable. Since the value is only initialized once and @@ -89,14 +90,18 @@ _nml_dbus_log(NMLDBusLogLevel level, gboolean use_stdout, const char *fmt, ...) ts = nm_utils_clock_gettime_nsec(CLOCK_BOOTTIME); + pid = getpid(); + if (use_stdout) { - g_print("libnm-dbus: %s[%" G_GINT64_FORMAT ".%05" G_GINT64_FORMAT "] %s\n", + g_print("libnm-dbus[%lld]: %s[%" G_GINT64_FORMAT ".%05" G_GINT64_FORMAT "] %s\n", + (long long) pid, prefix, ts / NM_UTILS_NSEC_PER_SEC, (ts / (NM_UTILS_NSEC_PER_SEC / 10000)) % 10000, msg); } else { - g_printerr("libnm-dbus: %s[%" G_GINT64_FORMAT ".%05" G_GINT64_FORMAT "] %s\n", + g_printerr("libnm-dbus[%lld]: %s[%" G_GINT64_FORMAT ".%05" G_GINT64_FORMAT "] %s\n", + (long long) pid, prefix, ts / NM_UTILS_NSEC_PER_SEC, (ts / (NM_UTILS_NSEC_PER_SEC / 10000)) % 10000, |