Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions heudiconv/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
# set logger handler
import logging
import os

from ._version import __version__
from .info import __packagename__

__all__ = ["__packagename__", "__version__"]

# Rudimentary logging support.
lgr = logging.getLogger(__name__)
logging.basicConfig(
format="%(levelname)s: %(message)s",
level=getattr(logging, os.environ.get("HEUDICONV_LOG_LEVEL", "INFO")),
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I also add it to heudiconv/cli/monitor.py?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure so we don't wonder later on. But then may be place it into some function config_logging or alike so we do not duplicate definitions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heh, ok then, let's just proceed for now. Not yet sure if we ever get back to monitor to make it actually used.

lgr.debug("Starting the abomination") # just to "run-test" logging
4 changes: 4 additions & 0 deletions heudiconv/cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@


def main(argv=None):
logging.basicConfig(
format="%(levelname)s: %(message)s",
level=getattr(logging, os.environ.get("HEUDICONV_LOG_LEVEL", "INFO")),
)
parser = get_parser()
args = parser.parse_args(argv)
# exit if nothing to be done
Expand Down