Skip to content

Commit

Permalink
Merge pull request #3191 from pajod/patch-severity
Browse files Browse the repository at this point in the history
logging: swap error/debug severity on socket creation failure
  • Loading branch information
benoitc authored Aug 7, 2024
2 parents 56324be + ce039ca commit 77b65a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gunicorn/sock.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ def create_sockets(conf, log, fds=None):
log.error("Connection in use: %s", str(addr))
if e.args[0] == errno.EADDRNOTAVAIL:
log.error("Invalid address: %s", str(addr))
msg = "connection to {addr} failed: {error}"
log.error(msg.format(addr=str(addr), error=str(e)))
if i < 5:
msg = "connection to {addr} failed: {error}"
log.debug(msg.format(addr=str(addr), error=str(e)))
log.error("Retrying in 1 second.")
log.debug("Retrying in 1 second.")
time.sleep(1)
else:
break
Expand Down

0 comments on commit 77b65a0

Please sign in to comment.