Skip to content

Commit

Permalink
fix remote logging cleanup code and ensure we always set the global_l…
Browse files Browse the repository at this point in the history
…ogging_handler to a callable to prevent further mishaps

git-svn-id: https://xpra.org/svn/Xpra/trunk@26356 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed May 15, 2020
1 parent add1a2a commit aded5af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/xpra/log.py
Expand Up @@ -141,6 +141,7 @@ def standard_logging(log, level, msg, *args, **kwargs):
global_logging_handler = standard_logging

def set_global_logging_handler(h):
assert callable(h)
global global_logging_handler
saved = global_logging_handler
global_logging_handler = h
Expand Down
2 changes: 1 addition & 1 deletion src/xpra/server/mixins/logging_server.py
Expand Up @@ -85,7 +85,7 @@ def stop_capturing_logging(self):
ll = self.local_logging
if ll:
self.local_logging = None
set_global_logging_handler(self.local_logging)
set_global_logging_handler(ll)


def remote_logging_handler(self, log, level, msg, *args, **kwargs):
Expand Down

0 comments on commit aded5af

Please sign in to comment.