Skip to content

Commit 81a8bc6

Browse files
Restrict logging output to sc2ts
1 parent f4855f2 commit 81a8bc6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

sc2ts/cli.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,12 @@ def setup_logging(verbosity, log_file=None):
7575
# at the console output. For development this is better than having
7676
# to go to the log to see the traceback, but for production it may
7777
# be better to let daiquiri record the errors as well.
78-
daiquiri.setup(level=log_level, outputs=outputs, set_excepthook=False)
78+
daiquiri.setup(outputs=outputs, set_excepthook=False)
79+
# Only show stuff coming from sc2ts. Sometimes it's handy to look
80+
# at the tsinfer logs too, so we could add an option to set its
81+
# levels
82+
logger = logging.getLogger("sc2ts")
83+
logger.setLevel(log_level)
7984

8085

8186
# TODO add options to list keys, dump specific alignments etc

0 commit comments

Comments
 (0)