diff --git a/src/libnm-log-core/nm-logging.c b/src/libnm-log-core/nm-logging.c index 0909e7992..a2bd2a272 100644 --- a/src/libnm-log-core/nm-logging.c +++ b/src/libnm-log-core/nm-logging.c @@ -92,7 +92,6 @@ typedef struct { typedef struct { NMLogLevel log_level; bool uses_syslog : 1; - bool init_pre_done : 1; bool init_done : 1; bool debug_stderr : 1; const char *prefix; @@ -926,40 +925,6 @@ nm_logging_syslog_enabled(void) return gl.imm.uses_syslog; } -void -nm_logging_init_pre(const char *syslog_identifier, char *prefix_take) -{ - /* this function may be called zero or one times, and only - * - on the main thread - * - not after nm_logging_init(). */ - - NM_ASSERT_ON_MAIN_THREAD(); - - if (gl.imm.init_pre_done) - g_return_if_reached(); - - if (gl.imm.init_done) - g_return_if_reached(); - - if (!_syslog_identifier_valid_domain(syslog_identifier)) - g_return_if_reached(); - - if (!prefix_take || !prefix_take[0]) - g_return_if_reached(); - - G_LOCK(log); - - gl.mut.init_pre_done = TRUE; - - gl.mut.syslog_identifier = g_strdup_printf("SYSLOG_IDENTIFIER=%s", syslog_identifier); - nm_assert(_syslog_identifier_assert(gl.imm.syslog_identifier)); - - /* we pass the allocated string on and never free it. */ - gl.mut.prefix = prefix_take; - - G_UNLOCK(log); -} - void nm_logging_init(const char *logging_backend, gboolean debug) { diff --git a/src/libnm-log-core/nm-logging.h b/src/libnm-log-core/nm-logging.h index 807196755..82d8fc2d9 100644 --- a/src/libnm-log-core/nm-logging.h +++ b/src/libnm-log-core/nm-logging.h @@ -145,8 +145,6 @@ const char *nm_logging_all_domains_to_string(void); gboolean nm_logging_setup(const char *level, const char *domains, char **bad_domains, GError **error); -void nm_logging_init_pre(const char *syslog_identifier, char *prefix_take); - void nm_logging_init(const char *logging_backend, gboolean debug); gboolean nm_logging_syslog_enabled(void);