merge: branch 'jv/del-unused-logging'
core/logging: remove unused nm_logging_init_pre() function https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1902
This commit is contained in:
@@ -92,7 +92,6 @@ typedef struct {
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
NMLogLevel log_level;
|
NMLogLevel log_level;
|
||||||
bool uses_syslog : 1;
|
bool uses_syslog : 1;
|
||||||
bool init_pre_done : 1;
|
|
||||||
bool init_done : 1;
|
bool init_done : 1;
|
||||||
bool debug_stderr : 1;
|
bool debug_stderr : 1;
|
||||||
const char *prefix;
|
const char *prefix;
|
||||||
@@ -926,40 +925,6 @@ nm_logging_syslog_enabled(void)
|
|||||||
return gl.imm.uses_syslog;
|
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
|
void
|
||||||
nm_logging_init(const char *logging_backend, gboolean debug)
|
nm_logging_init(const char *logging_backend, gboolean debug)
|
||||||
{
|
{
|
||||||
|
@@ -145,8 +145,6 @@ const char *nm_logging_all_domains_to_string(void);
|
|||||||
gboolean
|
gboolean
|
||||||
nm_logging_setup(const char *level, const char *domains, char **bad_domains, GError **error);
|
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);
|
void nm_logging_init(const char *logging_backend, gboolean debug);
|
||||||
|
|
||||||
gboolean nm_logging_syslog_enabled(void);
|
gboolean nm_logging_syslog_enabled(void);
|
||||||
|
Reference in New Issue
Block a user