Skip to content
New issue

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

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

Already on GitHub? # to your account

Logging improvements & fixes #187

Merged
merged 1 commit into from
Jan 30, 2023

Conversation

ogajduse
Copy link
Member

  • formatted logging related code using black
  • removed deprecated logzero.setup_default_logger
    • broken down into logzero.formatter, logzero.loglevel and logzero.logfile
  • fixed broken logging in ipython console with %autoreload 2 turned on
    • _old_factory is None by default and is set to broker_record_factory only if _old_factory was not set to broker_record_factory yet.

@ogajduse ogajduse changed the title Logging improvements Logging improvements & fixes Jan 27, 2023
Copy link
Collaborator

@Griffin-Sullivan Griffin-Sullivan left a comment

Choose a reason for hiding this comment

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

I don't see any tests related to logging. Changes LGTM.

Validator("LOGGING.LEVEL", is_in=["error", "warning", "info", "debug", "trace", "silent"], default="info"),
Validator("LOGGING.FILE_LEVEL", is_in=["error", "warning", "info", "debug", "trace", "silent"], default="debug"),
Validator(
"LOGGING.LEVEL",
Copy link
Member

Choose a reason for hiding this comment

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

Is this the new version?

Suggested change
"LOGGING.LEVEL",
"LOGGING.CONSOLE_LEVEL",

Copy link
Member Author

@ogajduse ogajduse Jan 30, 2023

Choose a reason for hiding this comment

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

🤦‍♂️ oh yeah, I forgot that one.
Fixed by f4e3aef.

* formatted logging related code using black
* removed deprecated logzero.setup_default_logger
  * broken down into logzero.formatter, logzero.loglevel and logzero.logfile
* fixed broken logging in ipython console with %autoreload 2 turned on
  * _old_factory is None by default and is set to
    `broker_record_factory` only if _old_factory was not set to
`broker_record_factory` yet.
@ogajduse ogajduse force-pushed the fix/logging/old_factory branch from a14db34 to f4e3aef Compare January 30, 2023 15:54
Copy link
Member

@JacobCallahan JacobCallahan left a comment

Choose a reason for hiding this comment

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

ACK, thanks!

@ogajduse
Copy link
Member Author

some test results:

$ pytest tests/functional/test_containers.py -k 'not test_container_e2e_mp and test_container_e2e'
=================================================================================================================================================================================================== test session starts ====================================================================================================================================================================================================
platform linux -- Python 3.11.1, pytest-7.2.1, pluggy-1.0.0 -- /home/ogajduse/.virtualenvs/broker-dev/bin/python
cachedir: .pytest_cache
rootdir: /home/ogajduse/repos/broker, configfile: pytest.ini
collected 8 items / 7 deselected / 1 selected                                                                                                                                                                                                                                                                                                                                                                              

tests/functional/test_containers.py::test_container_e2e PASSED

@JacobCallahan JacobCallahan merged commit 5a3f74b into SatelliteQE:master Jan 30, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants