-
Notifications
You must be signed in to change notification settings - Fork 1
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
Logging system rework #59
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good to me, although I find the trigger logging level names strange
TLVL_VERY_IMPORTANT = 1, | ||
TLVL_IMPORTANT = 2, | ||
TLVL_GENERAL = 3, | ||
TLVL_DEBUG_INFO = 4, | ||
TLVL_DEBUG_LOW = 5, | ||
TLVL_DEBUG_MEDIUM = 10, | ||
TLVL_DEBUG_HIGH = 15, | ||
TLVL_DEBUG_ALL = 20 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMPORTANT
and VERY_IMPORTANT
is strange naming (I guess GENERAL
and DEBUG_INFO
are too). Is the naming similar across the rest of the DAQ? The usual naming for different logging verbosity in the industry is:
TRACE
for everything, soTLVL_DEBUG_ALL
DEBUG
for the debugging messages (here it makes sense to have low, medium, high)INFO
would be yourVERY_IMPORTANT
,IMPORTANT
and/orDEBUG_INFO
,WARN
for warnings (we have different system for that),ERROR
for errors (we have different system for that),FATAL
for fatal errors that should crash (we have different system for that).
What are the namings in the rest of the DAQ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This naming is completely custom. As far as I know, there is no consistency across dunedaq. There are some repos that have a version of this, example in-file enum here and separare logging header here. Other places simply use integers example here, and these do go to high values (example here).
I just made that list according to what made sense to me, and wanted it to (a) be granural at the lower levels and (b) roughly cover the available space for levels. Open to changes. As you mentioned, we are not using standards from the industry (or at least not closely).
@@ -34,7 +40,7 @@ TriggerCandidateMakerMichelElectron::operator()(const TriggerActivity& activity, | |||
|
|||
// add_window_to_record(m_current_window); | |||
// dump_window_record(); | |||
// TLOG(1) << "Constructing trivial TC."; | |||
TLOG_DEBUG(TLVL_DEBUG_LOW) << "[TCM:ME] Constructing trivial TC."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TLOG_DEBUG(TLVL_DEBUG_LOW) << "[TCM:ME] Constructing trivial TC."; | |
TLOG_DEBUG(TLVL_DEBUG_LOW) << "[TCM:ME] Constructing a TC."; |
I know this is not your doing, but might as well correct this... why "Constructing trivial TC"? Why "trivial"? Are there non-trivial TCs? I think just "Constructing a TC" would be fine here, and less confusing...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not been generally modifying the messages (outside of few examples in MLT where I added more information). I agree with your change.
@@ -34,8 +40,8 @@ TriggerCandidateMakerPlaneCoincidence::operator()(const TriggerActivity& activit | |||
|
|||
// add_window_to_record(m_current_window); | |||
// dump_window_record(); | |||
TLOG(1) << "Constructing trivial TC."; | |||
TLOG(1) << "Activity count: " << m_activity_count; | |||
TLOG_DEBUG(TLVL_DEBUG_LOW) << "[TCM:PC] Constructing trivial TC."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TLOG_DEBUG(TLVL_DEBUG_LOW) << "[TCM:PC] Constructing trivial TC."; | |
TLOG_DEBUG(TLVL_DEBUG_LOW) << "[TCM:PC] Constructing a TC."; |
Ditto w.g. "trivial"
Thanks for the review. I have removed the 'trivial' messages in comment above. |
Please see details in DUNE-DAQ/trigger#285