Skip to content

Commit

Permalink
Log 410 errors on DEBUG instead of INFO (they are used to block and c…
Browse files Browse the repository at this point in the history
…an be spammy)
  • Loading branch information
zwimer committed Oct 15, 2024
1 parent 55f14f2 commit 728375e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rpipe/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__: str = "9.0.6" # Must be "<major>.<minor>.<patch>", all numbers
__version__: str = "9.0.7" # Must be "<major>.<minor>.<patch>", all numbers
2 changes: 1 addition & 1 deletion rpipe/server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def wrapper(*args, **kwargs):
if not server.debug: # Flask in debug mode already does what we want
if (fp := request.full_path).endswith("?"):
fp = fp[:-1]
lvl = DEBUG if (ret.status_code < 300 or ret.status_code == 425) else INFO
lvl = DEBUG if (ret.status_code < 300 or ret.status_code in (410, 425)) else INFO
args = (request.remote_addr, request.method, fp, ret.status_code)
getLogger(_LOG).log(lvl, '%s - "%s %s" %d', *args)
return ret
Expand Down
2 changes: 1 addition & 1 deletion rpipe/server/server/shutdown_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def __init__(self, state: State, file: Path):
self._state = state
self.file: Path = file
self._log = getLogger(_LOG)
self._log.info("Installing signal handlers so that atexit catches these.")
self._log.info("Installing signal handlers so that atexit catches these")
signal.signal(signal.SIGTERM, lambda *_: sys.exit(1))
self._log.info("Installing atexit shutdown handler")
atexit.register(self._shutdown)
Expand Down

0 comments on commit 728375e

Please sign in to comment.