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

chore: change logging structure #128

Merged
merged 3 commits into from
Jun 30, 2023
Merged

chore: change logging structure #128

merged 3 commits into from
Jun 30, 2023

Conversation

LukeWeidenwalker
Copy link
Contributor

Follow-up to conversation in Open-EO/openeo-python-client#434 (comment)

@clausmichele what do you think about this structure instead?

@codecov
Copy link

codecov bot commented Jun 29, 2023

Codecov Report

Merging #128 (10f87b5) into main (1b6e369) will decrease coverage by 1.21%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #128      +/-   ##
==========================================
- Coverage   77.84%   76.63%   -1.21%     
==========================================
  Files          25       25              
  Lines        1020     1070      +50     
==========================================
+ Hits          794      820      +26     
- Misses        226      250      +24     
Impacted Files Coverage Δ
...processes_dask/process_implementations/__init__.py 76.47% <ø> (ø)
...neo_processes_dask/process_implementations/core.py 97.56% <100.00%> (-0.06%) ⬇️

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@clausmichele
Copy link
Member

@LukeWeidenwalker:

  1. I would init the logger before the try imports, where we also use the logger.
  2. It would be nice to allow the init of the log_format and of the level by the user, if they would like to specify a different format or set the level differently from INFO.

@soxofaan
Copy link
Member

I would init the logger before the try imports, where we also use the logger.

As mentioned above: a library should never initialize loggers, especially not during/before imports. That's the responsibility of an application or entrypoint script.

It would be nice to allow the init of the log_format and of the level by the user, if they would like to specify a different format or set the level differently from INFO.

That's one of the reasons it should not be done magically by a library: to give the user/application the proper opportunity to set up the logging as desired.

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

Successfully merging this pull request may close these issues.

3 participants