From: Dan Breslau Date: Wed, 26 Oct 2016 18:19:10 +0000 (-0400) Subject: Get the config file location from an environment variable X-Git-Tag: v0.9.6.2~1 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=moonshot-ui.git;a=commitdiff_plain;h=c8fbf25276a386cc00f31096dbfd78d592cbc9db Get the config file location from an environment variable --- diff --git a/src/moonshot-logger.vala b/src/moonshot-logger.vala index 33796a2..4c4c7fc 100644 --- a/src/moonshot-logger.vala +++ b/src/moonshot-logger.vala @@ -55,8 +55,13 @@ public class MoonshotLogger : Object { if (!logger_is_initialized) { Log.set_default_handler(glib_default_log_handler); - //!! TODO: Don't hard-code the pathname. - Log4Vala.init("/home/dbreslau/log4vala.conf"); +#if IPC_MSRPC + // Look for config file in the app's current directory. + string conf_file = "log4vala.conf"; +#else + string conf_file = GLib.Environment.get_variable("MOONSHOT_UI_LOG_CONFIG"); +#endif + Log4Vala.init(conf_file); logger_is_initialized = true; }