-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
Summary
Add a small public API to query the current logging level from Fortran: get_log_level(). This complements set_log_level() and is useful for applications/tests to save/restore verbosity and to assert logger state.
Proposed changes
- Add integer function get_log_level() to module fortplot_logging, returning the current log level.
- Re-export it from the top-level fortplot module alongside set_log_level and LOG_LEVEL_* constants.
- Add a focused FPM test that exercises transitions and verifies that get_log_level() matches expectations.
Rationale
- Symmetric API (setter + getter) improves usability.
- Enables tests to assert logger state without relying on output capture.
- Zero behavior change unless API is called; no impact to existing code.
Verification
- fpm test should pass, including the new test.
- No output artifacts affected.
Metadata
Metadata
Assignees
Labels
No labels