Qt World Summit: Submit your Presentation

Local qMessageHandled and message pattern

  • Hello!
    I use Qt-5.12.6, can I set independent qMessageHandler and/or message pattern for different part of application, e.g. plugin will use message pattern %{time yyyyMMdd h:mm:ss.zzz} %{catery}, but application - {%file} %{function} %{line}?
    Thank you.

  • @debian
    I don't think so, as there is only one globally-installed message handler:

    Only one message handler can be defined, since this is usually done on an application-wide basis to control debug output.

    You would need something in code in your handler which could (somehow) distinguish where you are being called from in code. Which is liable to be difficult....

Log in to reply