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

protocols refactor protocol logging to a macro #7324

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

gulafaran
Copy link
Contributor

this avoids the usage of the unique_ptr PROTO::protocol before it has been constructed incase one wants to log something inside the constructor itself, move the logging to macros and print file:linenumber on ERR,CRIT,WARN and classname on the rest of the levels.

this is how it looks in the log with two test printing lines added to CCursorShapeProtocol constructor.

PROTOLOG(ERR, "constructing CCursorShapeProtocol");
PROTOLOG(LOG, "constructing CCursorShapeProtocol");

2024-08-13-224450_hyprshot

src/macros.hpp Outdated Show resolved Hide resolved
src/macros.hpp Outdated Show resolved Hide resolved
src/macros.hpp Outdated Show resolved Hide resolved
this avoids the usage of the unique_ptr PROTO::protocol before it has
been constructed incase one wants to log something inside the
constructor itself, move the logging to macros and print file:linenumber
on ERR,CRIT,WARN and classname on the rest of the levels.
Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

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

👍

@vaxerski vaxerski merged commit 12d9901 into hyprwm:main Aug 15, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants