From 543eb5b489e93646328195b924e6c809a317fc66 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Thu, 2 Apr 2015 08:53:31 -0400 Subject: [PATCH] Provide convenience attribute for logging in IE mako. --- .../interactive_environments/ipython/templates/ipython.mako | 1 + lib/galaxy/web/base/interactive_environments.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/config/plugins/interactive_environments/ipython/templates/ipython.mako b/config/plugins/interactive_environments/ipython/templates/ipython.mako index f4c169bcb60..8f3a3d6655a 100644 --- a/config/plugins/interactive_environments/ipython/templates/ipython.mako +++ b/config/plugins/interactive_environments/ipython/templates/ipython.mako @@ -35,6 +35,7 @@ notebook_access_url = ie_request.url_template('${PROXY_URL}/ipython/${PORT}/note notebook_login_url = ie_request.url_template('${PROXY_URL}/ipython/${PORT}/login?next=%2Fipython%2F${PORT}%2Ftree') docker_cmd = ie_request.docker_cmd(temp_dir) +ie_request.log.info("Starting IPython docker container with command [%s]" % docker_cmd) subprocess.call(docker_cmd, shell=True) %> diff --git a/lib/galaxy/web/base/interactive_environments.py b/lib/galaxy/web/base/interactive_environments.py index 6fd32528e20..63a8954ac4f 100644 --- a/lib/galaxy/web/base/interactive_environments.py +++ b/lib/galaxy/web/base/interactive_environments.py @@ -11,6 +11,9 @@ eggs.require("PyYAML") import yaml from galaxy.managers import api_keys +import logging +log = logging.getLogger(__name__) + class InteractiveEnviornmentRequest(object): @@ -18,6 +21,7 @@ class InteractiveEnviornmentRequest(object): plugin_config = plugin.config self.trans = trans + self.log = log self.attr = Bunch() self.attr.viz_id = plugin_config["name"].lower()