Important: Please read the Qt Code of Conduct -

qt message handler code execution

  • Hi,

    Just wanted to make sure that I understand this correctly:
    If I mark some logging categories in a messagehandler as disabled,
    the code in the qCCritical, qCDebug lines is still executed at runtime right?
    Assertions are always executed as well.

    I was thinking if it is worthwhile if you have some more complex debug lines
    to go with ifdef _debug...

  • Lifetime Qt Champion


    AFAIU, if the category is disabled, nothing will happen after the enabled check.

Log in to reply