Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

log: Use TYPE_MASK to avoid problems with LOG_CORE #800

Merged
merged 2 commits into from
Jul 1, 2021

Conversation

jonasdn
Copy link
Contributor

@jonasdn jonasdn commented Jun 22, 2021

Fixes: #798

Copy link
Contributor

@whoenig whoenig left a comment

Choose a reason for hiding this comment

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

Minor suggestion: move logGetType to the header file, mark it as inline, and then use the function throughout, rather than having to rely on not forgetting the TYPE_MASK. Perhaps TYPE_MASK should also be renamed to LOG_TYPE_MASK.

Instead of open coding it.
@jonasdn
Copy link
Contributor Author

jonasdn commented Jun 22, 2021

Minor suggestion: move logGetType to the header file, mark it as inline, and then use the function throughout, rather than having to rely on not forgetting the TYPE_MASK. Perhaps TYPE_MASK should also be renamed to LOG_TYPE_MASK.

Thanks!

The problem with moving logGetType to the header is that it references the global struct logs which point directly to the memory area of log structures. I am not sure we want that in a header file.

I pushed a commit that makes more use of logGetType and marks it inline, but does not move it to the header.

Copy link
Contributor

@whoenig whoenig left a comment

Choose a reason for hiding this comment

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

Nice!

@jonasdn jonasdn merged commit a096b49 into master Jul 1, 2021
@jonasdn jonasdn added this to the 2021-06-rc1 milestone Jul 1, 2021
@jonasdn jonasdn deleted the jonasdn/log_core_fix branch September 27, 2021 04:59
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.

usd unable to log
2 participants