Skip to content

Refactor the logging and add support for the use of a log-config file#122

Draft
adybbroe wants to merge 6 commits intopytroll:mainfrom
adybbroe:add-support4logconfig
Draft

Refactor the logging and add support for the use of a log-config file#122
adybbroe wants to merge 6 commits intopytroll:mainfrom
adybbroe:add-support4logconfig

Conversation

@adybbroe
Copy link
Contributor

@adybbroe adybbroe commented Jun 23, 2022

With this PR it shall be possible to run e.g. the move_it_client.py script with a log-config file defining the log-handlers etc. For instance like this:

python bin/move_it_client.py -c </path/to/my/log/config/file/>/log_config.yaml ./example_move_it_client.cfg

I have also tried to refactor the logging support a bit collecting it in a logging.py module.

But I might need some help soritng out the continuous support of the logging without providing a log-config yaml file!

  • Closes #xxxx
  • Tests added
  • Fully documented
  • Add your name to AUTHORS.md if not there already

Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
@codecov
Copy link

codecov bot commented Jun 23, 2022

Codecov Report

Merging #122 (fe10b29) into main (662d86a) will decrease coverage by 0.27%.
The diff coverage is 90.81%.

@@            Coverage Diff             @@
##             main     #122      +/-   ##
==========================================
- Coverage   77.90%   77.63%   -0.28%     
==========================================
  Files          18       19       +1     
  Lines        4001     3814     -187     
==========================================
- Hits         3117     2961     -156     
+ Misses        884      853      -31     
Flag Coverage Δ
unittests 77.63% <90.81%> (-0.28%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
trollmoves/move_it_base.py 23.71% <20.00%> (+2.08%) ⬆️
trollmoves/logger.py 88.63% <88.63%> (ø)
trollmoves/tests/test_logger.py 100.00% <100.00%> (ø)
trollmoves/dispatcher.py

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
Adam.Dybbroe and others added 4 commits July 8, 2022 16:00
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments