Skip to content

Conversation

elbeno
Copy link
Contributor

@elbeno elbeno commented Jan 14, 2025

Problem:

  • CIB_LOG_ENV defines a current logging environment, but it doesn't introduce a scope, so defining more than one in a scope is ill-formed.
  • Defining a logging environment for just one log line is verbose.
  • The logging macros themselves should not get overloaded with environment gunk, even if there were a suitable way to do so.

Solution:

  • Add CIB_WITH_LOG_ENV that allows defining a logging environment scope easily.

Problem:
- `CIB_LOG_ENV` defines a current logging environment, but it doesn't introduce
  a scope, so defining more than one in a scope is ill-formed.
- Defining a logging environment for just one log line is verbose.
- The logging macros themselves should not get overloaded with environment gunk,
  even if there were a suitable way to do so.

Solution:
- Add `CIB_WITH_LOG_ENV` that allows defining a logging environment scope easily.
@lukevalenty lukevalenty merged commit 760ab04 into intel:main Jan 14, 2025
22 checks passed
@elbeno elbeno deleted the with-log-env branch January 14, 2025 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants