diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2020-05-19 16:38:51 +0200 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2020-05-19 16:38:51 +0200 |
| commit | 96642ebde58e1eea692aea6a92d33f45452fa9c0 (patch) | |
| tree | 106ddfa2180b3997e8965787b5cb122982ebab9d /src/nm-logging.c | |
| parent | 8f6881ac06714ef99cc470a03e7ac0ce1af49a16 (diff) | |
| parent | d460892bbfece74fb6d3cd846bf6ef548290be41 (diff) | |
Merge branch 'upstream/latest' of https://salsa.debian.org/utopia-team/network-manager into upstream/latestt pu
Diffstat (limited to 'src/nm-logging.c')
| -rw-r--r-- | src/nm-logging.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nm-logging.c b/src/nm-logging.c index 9221a6c8..3368c5db 100644 --- a/src/nm-logging.c +++ b/src/nm-logging.c @@ -390,7 +390,7 @@ nm_logging_setup (const char *level, } } - g_clear_pointer (&gl_main.logging_domains_to_string, g_free); + nm_clear_g_free (&gl_main.logging_domains_to_string); had_platform_debug = _nm_logging_enabled_lockfree (LOGL_DEBUG, LOGD_PLATFORM); @@ -735,7 +735,7 @@ _nm_log_impl (const char *file, char *s_log_domains; gsize l_log_domains; - now = nm_utils_get_monotonic_timestamp_ns (); + now = nm_utils_get_monotonic_timestamp_nsec (); boottime = nm_utils_monotonic_timestamp_as_boottime (now, 1); _iovec_set_format_a (iov++, 30, "PRIORITY=%d", level_desc[level].syslog_level); @@ -766,8 +766,8 @@ _nm_log_impl (const char *file, _iovec_set_format (iov++, iov_free++, "CODE_FUNC=%s", func); _iovec_set_format (iov++, iov_free++, "CODE_FILE=%s", file ?: ""); _iovec_set_format_a (iov++, 20, "CODE_LINE=%u", line); - _iovec_set_format_a (iov++, 60, "TIMESTAMP_MONOTONIC=%lld.%06lld", (long long) (now / NM_UTILS_NS_PER_SECOND), (long long) ((now % NM_UTILS_NS_PER_SECOND) / 1000)); - _iovec_set_format_a (iov++, 60, "TIMESTAMP_BOOTTIME=%lld.%06lld", (long long) (boottime / NM_UTILS_NS_PER_SECOND), (long long) ((boottime % NM_UTILS_NS_PER_SECOND) / 1000)); + _iovec_set_format_a (iov++, 60, "TIMESTAMP_MONOTONIC=%lld.%06lld", (long long) (now / NM_UTILS_NSEC_PER_SEC), (long long) ((now % NM_UTILS_NSEC_PER_SEC) / 1000)); + _iovec_set_format_a (iov++, 60, "TIMESTAMP_BOOTTIME=%lld.%06lld", (long long) (boottime / NM_UTILS_NSEC_PER_SEC), (long long) ((boottime % NM_UTILS_NSEC_PER_SEC) / 1000)); if (error != 0) _iovec_set_format_a (iov++, 30, "ERRNO=%d", error); if (ifname) @@ -868,7 +868,7 @@ nm_log_handler (const char *log_domain, { gint64 now, boottime; - now = nm_utils_get_monotonic_timestamp_ns (); + now = nm_utils_get_monotonic_timestamp_nsec (); boottime = nm_utils_monotonic_timestamp_as_boottime (now, 1); sd_journal_send ("PRIORITY=%d", syslog_priority, @@ -878,8 +878,8 @@ nm_log_handler (const char *log_domain, "SYSLOG_FACILITY=3", "GLIB_DOMAIN=%s", log_domain ?: "", "GLIB_LEVEL=%d", (int) (level & G_LOG_LEVEL_MASK), - "TIMESTAMP_MONOTONIC=%lld.%06lld", (long long) (now / NM_UTILS_NS_PER_SECOND), (long long) ((now % NM_UTILS_NS_PER_SECOND) / 1000), - "TIMESTAMP_BOOTTIME=%lld.%06lld", (long long) (boottime / NM_UTILS_NS_PER_SECOND), (long long) ((boottime % NM_UTILS_NS_PER_SECOND) / 1000), + "TIMESTAMP_MONOTONIC=%lld.%06lld", (long long) (now / NM_UTILS_NSEC_PER_SEC), (long long) ((now % NM_UTILS_NSEC_PER_SEC) / 1000), + "TIMESTAMP_BOOTTIME=%lld.%06lld", (long long) (boottime / NM_UTILS_NSEC_PER_SEC), (long long) ((boottime % NM_UTILS_NSEC_PER_SEC) / 1000), NULL); } break; @@ -999,7 +999,7 @@ nm_logging_init (const char *logging_backend, gboolean debug) if (fetch_monotonic_timestamp) { /* ensure we read a monotonic timestamp. Reading the timestamp the first * time causes a logging message. We don't want to do that during _nm_log_impl. */ - nm_utils_get_monotonic_timestamp_ns (); + nm_utils_get_monotonic_timestamp_nsec (); } if (obsolete_debug_backend) |