From 9c107104454e06c7bd3327a7205a5671a4ef9c84 Mon Sep 17 00:00:00 2001 From: rxu17 <26471741+rxu17@users.noreply.github.com> Date: Wed, 13 Mar 2024 10:00:14 -0700 Subject: [PATCH] [GEN-1191] Add file logging (#552) * add logging for getting files * explicitly set logging at INFO level * add stream for logger * add stream handler to write to stdout * add note --- genie/extract.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/genie/extract.py b/genie/extract.py index 763fcfcd..7ea84225 100644 --- a/genie/extract.py +++ b/genie/extract.py @@ -4,6 +4,7 @@ """ import logging +import sys from typing import List, Optional import synapseclient @@ -13,6 +14,9 @@ from genie import process_functions logger = logging.getLogger(__name__) +stdout_handler = logging.StreamHandler(stream=sys.stdout) +stdout_handler.setLevel(logging.INFO) +logger.addHandler(stdout_handler) def get_center_input_files( @@ -54,6 +58,7 @@ def get_center_input_files( if name.endswith(".vcf") and process != "mutation": continue + logger.info(f"GETTING FILE {name} ({ent_synid})") ent = syn.get(ent_synid, downloadFile=downloadFile) # HACK: Clinical file can come as two files.