projects
/
moonshot-ui.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ac29bce
)
Get the config file location from an environment variable
author
Dan Breslau
<dbreslau@painless-security.com>
Wed, 26 Oct 2016 18:19:10 +0000
(14:19 -0400)
committer
Dan Breslau
<dbreslau@painless-security.com>
Wed, 26 Oct 2016 18:19:10 +0000
(14:19 -0400)
src/moonshot-logger.vala
patch
|
blob
|
history
diff --git
a/src/moonshot-logger.vala
b/src/moonshot-logger.vala
index
33796a2
..
4c4c7fc
100644
(file)
--- 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);
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;
}
logger_is_initialized = true;
}