Skip to content

Commit 3cdabfc

Browse files
committed
Add logging arguments
1 parent d5f3e7a commit 3cdabfc

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

pgscatalog.match/src/pgscatalog/match/cli/intersect_cli.py

+13
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
def run_intersect():
1313
args = parse_args()
1414

15+
if args.verbose:
16+
logging.getLogger("pgscatalog.core").setLevel(logging.DEBUG)
17+
logging.getLogger("pgscatalog.match").setLevel(logging.DEBUG)
18+
logger.setLevel(logging.DEBUG)
19+
logger.debug("Verbose logging enabled")
20+
1521
# Process & sort reference variants
1622
logger.info("Reading & sorting REFERENCE variants: {}".format(args.reference))
1723
with xopen('reference_variants.txt', 'wt') as outf:
@@ -163,6 +169,13 @@ def parse_args(args=None):
163169
required=False,
164170
help="whether to limit matches to specific chromosome of the reference",
165171
)
172+
parser.add_argument(
173+
"-v",
174+
"--verbose",
175+
dest="verbose",
176+
action="store_true",
177+
help="<Optional> Extra logging information",
178+
)
166179
return parser.parse_args(args)
167180

168181

0 commit comments

Comments
 (0)