mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-18 07:23:00 +00:00
deprecate extra_log_file
and add loud warning about discarding information this has been the cause of many debugging difficulties, when redirecting output seems to be a better option in ~all cases.
This commit is contained in:
@@ -710,12 +710,29 @@ class JupyterHub(Application):
|
|||||||
return "%(color)s[%(levelname)1.1s %(asctime)s.%(msecs).03d %(name)s %(module)s:%(lineno)d]%(end_color)s %(message)s"
|
return "%(color)s[%(levelname)1.1s %(asctime)s.%(msecs).03d %(name)s %(module)s:%(lineno)d]%(end_color)s %(message)s"
|
||||||
|
|
||||||
extra_log_file = Unicode(
|
extra_log_file = Unicode(
|
||||||
help="""Send JupyterHub's logs to this file.
|
help="""
|
||||||
|
DEPRECATED: use output redirection instead, e.g.
|
||||||
|
|
||||||
This will *only* include the logs of the Hub itself,
|
jupyterhub &>> /var/log/jupyterhub.log
|
||||||
not the logs of the proxy or any single-user servers.
|
|
||||||
"""
|
"""
|
||||||
).tag(config=True)
|
).tag(config=True)
|
||||||
|
|
||||||
|
@observe('extra_log_file')
|
||||||
|
def _log_file_changed(self, change):
|
||||||
|
if change.new:
|
||||||
|
self.log.warning(dedent("""
|
||||||
|
extra_log_file is DEPRECATED in jupyterhub-0.8.2.
|
||||||
|
|
||||||
|
extra_log_file only redirects logs of the Hub itself,
|
||||||
|
and will discard any other output, such as
|
||||||
|
that of subprocess spawners or the proxy.
|
||||||
|
|
||||||
|
It is STRONGLY recommended that you redirect process
|
||||||
|
output instead, e.g.
|
||||||
|
|
||||||
|
jupyterhub &>> '{}'
|
||||||
|
""".format(change.new)))
|
||||||
|
|
||||||
extra_log_handlers = List(
|
extra_log_handlers = List(
|
||||||
Instance(logging.Handler),
|
Instance(logging.Handler),
|
||||||
help="Extra log handlers to set on JupyterHub logger",
|
help="Extra log handlers to set on JupyterHub logger",
|
||||||
|
Reference in New Issue
Block a user