summaryrefslogtreecommitdiff
path: root/src/nm-iface-helper.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-07-08 19:34:34 +0200
committerThomas Haller <thaller@redhat.com>2015-07-14 15:55:14 +0200
commit96a7f3a3bafa0cbdced4c5ff57767efa6335adfb (patch)
tree1565dd36cc04826a967e8defab662630fa095def /src/nm-iface-helper.c
parent1b808d3b255c0557b90cef49c0624a92e0cf5bf5 (diff)
downloadNetworkManager-96a7f3a3bafa0cbdced4c5ff57767efa6335adfb.tar.gz
logging: make use of journal configurable
Diffstat (limited to 'src/nm-iface-helper.c')
-rw-r--r--src/nm-iface-helper.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nm-iface-helper.c b/src/nm-iface-helper.c
index 72b69590b4..bec6cc8359 100644
--- a/src/nm-iface-helper.c
+++ b/src/nm-iface-helper.c
@@ -72,6 +72,7 @@ static struct {
char *dhcp4_clientid;
char *dhcp4_hostname;
char *iid_str;
+ char *logging_backend;
char *opt_log_level;
char *opt_log_domains;
guint32 priority_v4;
@@ -294,6 +295,7 @@ do_early_setup (int *argc, char **argv[])
{ "priority4", '\0', 0, G_OPTION_ARG_INT64, &priority64_v4, N_("Route priority for IPv4"), N_("0") },
{ "priority6", '\0', 0, G_OPTION_ARG_INT64, &priority64_v6, N_("Route priority for IPv6"), N_("1024") },
{ "iid", 'e', 0, G_OPTION_ARG_STRING, &global_opt.iid_str, N_("Hex-encoded Interface Identifier"), "" },
+ { "logging-backend", '\0', 0, G_OPTION_ARG_STRING, &global_opt.logging_backend, N_("The logging backend configuration value. See logging.backend in NetworkManager.conf"), NULL },
/* Logging/debugging */
{ "version", 'V', 0, G_OPTION_ARG_NONE, &global_opt.show_version, N_("Print NetworkManager version and exit"), NULL },
@@ -405,7 +407,9 @@ main (int argc, char *argv[])
main_loop = g_main_loop_new (NULL, FALSE);
setup_signals ();
- nm_logging_syslog_openlog (global_opt.debug);
+ nm_logging_syslog_openlog (global_opt.logging_backend
+ ? global_opt.logging_backend
+ : (global_opt.debug ? "debug" : NULL));
nm_log_info (LOGD_CORE, "nm-iface-helper (version " NM_DIST_VERSION ") is starting...");