Trace-level messages are written from FunctorDestination

Issue #18 new
Jan Marjanovic
created an issue

When using FunctorDestination the messages are filtered (based on the logging level) before they are passed to functor in this function:

void QsLogging::FunctorDestination::write(const LogMessage& message)

    ...

    if (message.level > QsLogging::TraceLevel)
        emit logMessageReady(message);
}

I don't understand the reason behind this check, but I would suggest removing it, as the filtering can be done either at the global-level or in the consumer.

Comments (1)

  1. raz repo owner

    The initial reason was performance related: my expectation was that trace messages would be logged with a high frequency, which might overload the thread's message queue.

    But that was just a gut feeling, I will have to test this to see how it behaves in practice.

  2. Log in to comment