summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/backend_app.py
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2015-10-06 12:43:13 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2015-10-06 15:54:59 -0300
commita1d6d06ec05ad3e2fb8f8b43fb693d2e1b4c75be (patch)
treefeb5280cf99493842d4163cc22e17766066c004a /src/leap/bitmask/backend_app.py
parent5518564ef8e054dbf15cd022ca01ccc656c89e5b (diff)
[bug] store logs in the right place
Load flags before creating logger so the logs path considers the standalone flag. Move the log file path definition to the function, otherwise it will calculated during import and (most likely) before defining the flags.STANDALONE value. Create logger inside `run_frontend` right after knowing if we are standalone or not. - Resolves: #7512
Diffstat (limited to 'src/leap/bitmask/backend_app.py')
-rw-r--r--src/leap/bitmask/backend_app.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/leap/bitmask/backend_app.py b/src/leap/bitmask/backend_app.py
index 1900c08f..fb1f4400 100644
--- a/src/leap/bitmask/backend_app.py
+++ b/src/leap/bitmask/backend_app.py
@@ -67,14 +67,14 @@ def run_backend(bypass_checks=False, flags_dict=None, frontend_pid=None):
observer = PythonLoggingObserver()
observer.start()
+ if flags_dict is not None:
+ dict_to_flags(flags_dict)
+
# NOTE: this needs to be used here, within the call since this function is
# executed in a different process and it seems that the process/thread
# identification isn't working 100%
logger = get_logger() # noqa
- if flags_dict is not None:
- dict_to_flags(flags_dict)
-
# The backend is the one who always creates the certificates. Either if it
# is run separately or in a process in the same app as the frontend.
if flags.ZMQ_HAS_CURVE: