mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-07 10:04:07 +00:00
Use log.exception when logging exceptions
This provides the stack trace in the log file, incredibly useful when debugging
This commit is contained in:
@@ -799,7 +799,7 @@ class User:
|
||||
e.reason = 'timeout'
|
||||
self.settings['statsd'].incr('spawner.failure.timeout')
|
||||
else:
|
||||
self.log.error(
|
||||
self.log.exception(
|
||||
"Unhandled error starting {user}'s server: {error}".format(
|
||||
user=self.name, error=e
|
||||
)
|
||||
@@ -809,7 +809,7 @@ class User:
|
||||
try:
|
||||
await self.stop(spawner.name)
|
||||
except Exception:
|
||||
self.log.error(
|
||||
self.log.exception(
|
||||
"Failed to cleanup {user}'s server that failed to start".format(
|
||||
user=self.name
|
||||
),
|
||||
@@ -857,7 +857,7 @@ class User:
|
||||
self.settings['statsd'].incr('spawner.failure.http_timeout')
|
||||
else:
|
||||
e.reason = 'error'
|
||||
self.log.error(
|
||||
self.log.exception(
|
||||
"Unhandled error waiting for {user}'s server to show up at {url}: {error}".format(
|
||||
user=self.name, url=server.url, error=e
|
||||
)
|
||||
@@ -866,7 +866,7 @@ class User:
|
||||
try:
|
||||
await self.stop(spawner.name)
|
||||
except Exception:
|
||||
self.log.error(
|
||||
self.log.exception(
|
||||
"Failed to cleanup {user}'s server that failed to start".format(
|
||||
user=self.name
|
||||
),
|
||||
|
Reference in New Issue
Block a user