Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logger setup is different from the core setup of the overall datalad. #348

Open
yarikoptic opened this issue Feb 28, 2023 · 0 comments
Open
Labels

Comments

@yarikoptic
Copy link
Member

I wanted to take advantage of some of the DATALAD_LOG settings we have but it seems that those are not in effect for metalad logs:

❯ datalad meta-extract -d . metalad_core | DATALAD_LOG_TRACEBACK=true DATALAD_LOG_NAME=1 datalad --dbg -l debug meta-add --version
datalad.cli.parser [DEBUG] datalad:8>main:89>parser:118,368  Command line args 1st pass for DataLad 0.18.2. Parsed: Namespace(common_debug=True, version=<function parser_add_version_opt.<locals>.print_version at 0x7fa39ca24900>) Unparsed: ['meta-add'] 
datalad.support.entrypoints [DEBUG] datalad:8>main:89>parser:143>helpers:191>entrypoints:43  Processing entrypoints 
datalad.support.entrypoints [DEBUG] datalad:8>main:89>parser:143>helpers:191>entrypoints:56  Loading entrypoint metalad from datalad.extensions 
datalad.support.entrypoints [DEBUG] datalad:8>main:89>parser:143>helpers:191>entrypoints:58  Loaded entrypoint metalad from datalad.extensions 
datalad.support.entrypoints [DEBUG] datalad:8>main:89>parser:143>helpers:191>entrypoints:65  Done processing entrypoints 
datalad.interface.base [DEBUG] datalad:8>main:89>parser:189,436>interface.base:161>importlib.__init__:126><frozen importlib._bootstrap>:1206,1178,1149,690><frozen importlib._bootstrap_external>:940><frozen importlib._bootstrap>:241>add:114>interface.base:429  Building doc for <class 'datalad_metalad.add.Add'> 
datalad.cli     [DEBUG] datalad:8>main:97  Parsing known args among ['/home/yoh/proj/datalad/datalad-metalad/venvs/dev3.11/bin/datalad', '--dbg', '-l', 'debug', 'meta-add', '--version'] 
datalad_metalad 0.4.12+32.g7944964
[INFO] Start core metadata extraction from Dataset(/tmp/meta-dataset) 
[INFO] Extracted core metadata from /tmp/meta-dataset 
[INFO] Finished core metadata extraction from Dataset(/tmp/meta-dataset) 
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>
BrokenPipeError: [Errno 32] Broken pipe

you can see above that we do get format of logs different for datalad core where it does provide all th etracebacks etc but then there is all those plain [INFO] ... log lines from metalad. And it is odd since metalad seems to do lgr = logging.getLogger("datalad.metadata.WHATEVER") thus should be within datalad. namespace AFAIK. But may be my understanding of how logging levels work is flawed, @jwodder - any immediate idea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant