mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-28 19:40:54 +00:00
Log exceptions (Fixes #447)
Exceptions were just written to stderr but not into logs.
This commit is contained in:
parent
c091399f5e
commit
3b71ab960e
2 changed files with 27 additions and 1 deletions
|
@ -104,7 +104,11 @@ def run():
|
|||
if not configuration_found:
|
||||
logger.warning("Configuration file '%s' not found" % options.config)
|
||||
|
||||
serve(configuration, logger)
|
||||
try:
|
||||
serve(configuration, logger)
|
||||
except Exception:
|
||||
logger.exception("An exception occurred during server startup:")
|
||||
exit(1)
|
||||
|
||||
|
||||
def serve(configuration, logger):
|
||||
|
@ -175,6 +179,7 @@ def serve(configuration, logger):
|
|||
server_class.max_connections = configuration.getint(
|
||||
"server", "max_connections")
|
||||
|
||||
RequestHandler.logger = logger
|
||||
if not configuration.getboolean("server", "dns_lookup"):
|
||||
RequestHandler.address_string = lambda self: self.client_address[0]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue