Description
Calls to logger.configure(level=…) don't result in filtering out log messages with lower levels.
Steps to Reproduce
- Create a file logz.py
# file: logz.py
from logly import logger
logger.configure(level="ERROR")
logger.debug("debugging")
logger.configure(level="DEBUG")
logger.debug("debugging again")
- Run it
$ uv run --with logly logz.py
Expected Behavior
[DEBUG] debugging again | module=__main__ | function=<module>
Actual Behavior
[DEBUG] debugging | module=__main__ | function=<module>
[DEBUG] debugging again | module=__main__ | function=<module>
Logly Version
0.1.6
Python Version
Python 3.12.5, Python 3.13
Operating System
Debian Linux
Installation Method
uv
Additional Context
Additional logger.complete() calls before logger.configure() didn't help.
Only after
logger.remove_all()
logger.add("console", filter_min_level="ERROR")
the lower levels are filtered out as expected.
Internal Debug Logs (Optional but Highly Recommended)
[2025-10-27 00:45:10.732] [LOGLY-INFO] [debug_init] Internal debug logging started
[2025-10-27 00:45:10.732] [LOGLY-INFO] [init] PyLogger initialized (auto_update_check=true, internal_debug=true)
[2025-10-27 00:45:10.732] [LOGLY-INFO] [configure] Starting configuration
[2025-10-27 00:45:10.732] [LOGLY-CONFIG] [configure] level = INFO
[2025-10-27 00:45:10.732] [LOGLY-CONFIG] [configure] color = true
[2025-10-27 00:45:10.732] [LOGLY-CONFIG] [configure] json = false
[2025-10-27 00:45:10.732] [LOGLY-CONFIG] [configure] console = true
[2025-10-27 00:45:10.732] [LOGLY-INFO] [configure] Starting configuration
[2025-10-27 00:45:10.732] [LOGLY-CONFIG] [configure] level = ERROR
[2025-10-27 00:45:10.732] [LOGLY-CONFIG] [configure] color = true
[2025-10-27 00:45:10.732] [LOGLY-CONFIG] [configure] json = false
[2025-10-27 00:45:10.732] [LOGLY-CONFIG] [configure] console = true
[2025-10-27 00:45:10.740] [LOGLY-INFO] [configure] Starting configuration
[2025-10-27 00:45:10.740] [LOGLY-CONFIG] [configure] level = DEBUG
[2025-10-27 00:45:10.740] [LOGLY-CONFIG] [configure] color = true
[2025-10-27 00:45:10.740] [LOGLY-CONFIG] [configure] json = false
[2025-10-27 00:45:10.740] [LOGLY-CONFIG] [configure] console = true
Solution Interest
No, I just want to report the issue
Question Type
No response
Additional Questions
The logly configuration should, for instance, be changed after processing CLI switches like --verbose or --debug. From the docs I would expect that simply calling logger.configure() can achieve this – do I misunderstand them?
Checklist
Description
Calls to
logger.configure(level=…)don't result in filtering out log messages with lower levels.Steps to Reproduce
Expected Behavior
Actual Behavior
Logly Version
0.1.6
Python Version
Python 3.12.5, Python 3.13
Operating System
Debian Linux
Installation Method
uv
Additional Context
Additional
logger.complete()calls beforelogger.configure()didn't help.Only after
the lower levels are filtered out as expected.
Internal Debug Logs (Optional but Highly Recommended)
Solution Interest
No, I just want to report the issue
Question Type
No response
Additional Questions
The logly configuration should, for instance, be changed after processing CLI switches like
--verboseor--debug. From the docs I would expect that simply callinglogger.configure()can achieve this – do I misunderstand them?Checklist