[$10 Bounty] Ability to categorize and toggle logging on a per-project, or per-context level. #14

Open
opened 2024-07-18 11:10:37 -04:00 by josh · 9 comments
Owner

Could do it with context-opening-and-closing-blocks, and additionally optional context parameter on all log functions.

LOG_CONTEXT("JUI");

RESTORE_LOG_CONTEXT();

DEBUG("JUI", "BIG PROBLEM XYZW");

Could do it with context-opening-and-closing-blocks, and additionally optional context parameter on all log functions. LOG_CONTEXT("JUI"); RESTORE_LOG_CONTEXT(); DEBUG("JUI", "BIG PROBLEM XYZW");
maxine was assigned by josh 2024-07-18 11:10:43 -04:00
josh added the
Kind/Feature
Kind/Enhancement
Kind/Breaking
Priority
High
labels 2024-07-18 11:10:51 -04:00
Author
Owner

The intent being we can disable logging on dependency packages and just review logs for the current project being developed. If you have further ideas on this please feel free to discuss.

The intent being we can disable logging on dependency packages and just review logs for the *current* project being developed. If you have further ideas on this please feel free to discuss.
Collaborator

Yeah, I have thought about rehauling jlog to utilize a logging class for better control over this. However it may make it more difficult to just DEBUG("whatever") and trace functions.

Yeah, I have thought about rehauling jlog to utilize a logging class for better control over this. However it may make it more difficult to just DEBUG("whatever") and trace functions.
Collaborator

I was playing with the idea this morning and realized it wouldn't fit well with what we currently have. I wish it was easier to do tracing from within C++ without macros.

I was playing with the idea this morning and realized it wouldn't fit well with what we currently have. I wish it was easier to do tracing from within C++ without macros.
Author
Owner

Alternatively, instead of toggling log calls, could logs be filtered out based on pattern matching?

Alternatively, instead of toggling log calls, could logs be filtered out based on pattern matching?
Collaborator

Maaaaaybeee. Although that sounds really hacky

Maaaaaybeee. Although that sounds really hacky
Author
Owner

Since the trace string displays which file it came from, could check if, filepath contains "cmake-build-debug/_deps/"
could be optionally filtered with hide_dependency_logs macro or something?

Since the trace string displays which file it came from, could check if, filepath contains "cmake-build-debug/_deps/" could be optionally filtered with hide_dependency_logs macro or something?
Author
Owner

Granted none of this is ideal systems design, but just to get us thru till we rewrite the entire thing at some point down the road.

Granted none of this is ideal systems design, but just to get us thru till we rewrite the entire thing at some point down the road.
Collaborator

Nah, we just need to rewrite it.

Nah, we just need to rewrite it.
Collaborator

Again Jlog needs reworked.

Again Jlog needs reworked.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: josh/jlog#14
No description provided.