Skip to content

Commit

Permalink
[GEN-1191] Add file logging (#552)
Browse files Browse the repository at this point in the history
* add logging for getting files

* explicitly set logging at INFO level

* add stream for logger

* add stream handler to write to stdout

* add note
  • Loading branch information
rxu17 authored Mar 13, 2024
1 parent 429dafb commit 9c10710
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions genie/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"""

import logging
import sys
from typing import List, Optional

import synapseclient
Expand All @@ -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(
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 9c10710

Please sign in to comment.