Project

General

Profile

Support #23284

logMessage_ function in BoardReaderCore and DataReceiverCore should be replaced with TLOG calls

Added by Eric Flumerfelt 3 months ago. Updated 2 months ago.

Status:
Resolved
Priority:
Normal
Category:
Additional Functionality
Target version:
-
Start date:
09/17/2019
Due date:
% Done:

0%

Estimated time:
Experiment:
-
Co-Assignees:
Duration:

Description

In BoardReaderCore and DataReceiverCore, a function is defined that checks if a verbose flag is set:

void artdaq::DataReceiverCore::logMessage_(std::string const& text)
{
    if (verbose_)
    {
        TLOG(TLVL_INFO) << text ;
    }
    else
    {
        TLOG(TLVL_DEBUG) << text ;
    }
}

The problem with this is that "text" often contains numbers which have been formatted into strings. TLOG) << text would allow TRACE to simply copy numeric variables into memory without formatting (if the level chosen isn't enabled for the slow path).

History

#1 Updated by Eric Flumerfelt 3 months ago

TLOG((verbose_ ? TLVL_INFO : TLVL_DEBUG)) << text;

#2 Updated by Eric Flumerfelt 2 months ago

  • Assignee set to Eric Flumerfelt
  • Status changed from New to Resolved
  • Category set to Additional Functionality

#3 Updated by Eric Flumerfelt 2 months ago

Implemented on artdaq:feature/23284_Core_ReplaceLogMessage



Also available in: Atom PDF