Skip to content

Commit

Permalink
Allow re-configuration of logger at runtime (e.g. in shell)
Browse files Browse the repository at this point in the history
  • Loading branch information
nursix committed Aug 28, 2021
1 parent 6620ed1 commit 3f5cd0b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nursix-dev-5065-g34d7030f0 (2021-08-27 23:42:46)
nursix-dev-5066-g6620ed10d (2021-08-28 12:48:49)
8 changes: 0 additions & 8 deletions modules/s3log.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,14 @@ def setup(cls):
Set up current.log
"""

if hasattr(current, "log"):
return
current.log = cls()
return

# -------------------------------------------------------------------------
def configure_logger(self):
"""
Configure output handlers
"""

if hasattr(current, "log"):
return

settings = current.deployment_settings
console = settings.get_log_console()
logfile = settings.get_log_logfile()
Expand Down Expand Up @@ -198,7 +192,6 @@ def _log(severity, message, value=None):
extra = {"caller": "(%s %s %s)" % caller}

logger.log(severity, msg, extra=extra)
return

# -------------------------------------------------------------------------
@classmethod
Expand Down Expand Up @@ -310,7 +303,6 @@ def listen(self):

self.handler = handler
self.strbuf = strbuf
return

# -------------------------------------------------------------------------
def read(self):
Expand Down

0 comments on commit 3f5cd0b

Please sign in to comment.