Skip to content

Commit

Permalink
Fix error logging from convert (#254)
Browse files Browse the repository at this point in the history
* Add streamhandler in convert function

* Set stream handler at file-level
  • Loading branch information
domna authored Feb 22, 2024
1 parent b8711da commit 743cf7d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pynxtools/dataconverter/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@

logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
logger.addHandler(logging.StreamHandler())


if sys.version_info >= (3, 10):
from importlib.metadata import entry_points
Expand Down Expand Up @@ -352,7 +354,6 @@ def convert_cli(
mapping: str,
):
"""The CLI entrypoint for the convert function"""
logger.addHandler(logging.StreamHandler())
if params_file:
try:
convert(**parse_params_file(params_file))
Expand Down

0 comments on commit 743cf7d

Please sign in to comment.