Skip to content

Conversation

NewYaroslav
Copy link
Owner

Summary

  • add LOGIT_DETAIL_CONDITIONAL_* helper macros to share the guarded condition body used by conditional logging
  • reimplement LOGIT_*_IF macros for all log levels in terms of the helpers to remove repetitive do-while blocks while preserving behavior
  • add a regression test that exercises LOGIT_PRINT__IF macros across levels to verify their conditional logging semantics

Testing

  • cmake -S . -B build -DLOGIT_CPP_BUILD_TESTS=ON -DLOGIT_USE_SUBMODULES=ON -DLOGIT_WITH_FMT=ON (fails: bundled TimeShield dependency is unavailable in the repository)

https://chatgpt.com/codex/tasks/task_e_68c83c081a4c832caa637ddacafbfc02

Add a dedicated regression test that exercises every LOGIT_PRINT_<LEVEL>_IF macro with both true and false conditions, verifies the emitted messages, and ensures the macros act as single statements inside an if/else chain.
@NewYaroslav NewYaroslav merged commit b79d6d8 into main Sep 15, 2025
10 checks passed
@NewYaroslav NewYaroslav deleted the codex/redefine-logit-print-macros-for-levels branch September 20, 2025 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant