From 0b267725bacc1853e370cd33dff0eef9395bea6f Mon Sep 17 00:00:00 2001 From: Alok Saldanha Date: Tue, 17 Sep 2019 13:08:30 -0400 Subject: [PATCH] #2 replace print() with logging --- cellxgene_gateway/prune_process_cache.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cellxgene_gateway/prune_process_cache.py b/cellxgene_gateway/prune_process_cache.py index 60afc99..db70807 100644 --- a/cellxgene_gateway/prune_process_cache.py +++ b/cellxgene_gateway/prune_process_cache.py @@ -8,6 +8,7 @@ # the specific language governing permissions and limitations under the License. import time +import logging from cellxgene_gateway.util import current_time_stamp from cellxgene_gateway.env import ttl @@ -32,5 +33,5 @@ class PruneProcessCache: for process in processes_to_delete: try: cache.prune(process) - except Exception as detail: - print("failed to prune process:", detail) + except Exception: + logging.getLogger("werkzeug").exception("failed to prune process")