working fine for both cpp and qml output

On 24.02.2014 05:37, Artem Marchenko wrote:
I found message handler working just fine (both for QML console and cpp qDebug() messages) is emulator builds, but not for when code is running on device. Go figure.

Could it be so that on device exactly QML engine is somehow always used separately from your c++ execution context.. no it doesn't make sense.

It would be nice to have some logs-to-file way working in production with both QML and c++ logs indeed.

Cheers,
Artem.



On Wed, Feb 5, 2014 at 4:58 PM, Robin Burchell <robin.burch...@jolla.com <mailto:robin.burch...@jolla.com>> wrote:

    On 04 Feb 2014, at 22:37, Tero Siironen <tero.siiro...@iki.fi
    <mailto:tero.siiro...@iki.fi>> wrote:
    > Andrey Kozhevnikov <coderusin...@gmail.com
    <mailto:coderusin...@gmail.com>> kirjoitti 4.2.2014 kello 23.14:
    >
    >> This is messages handler i'm using in my projects:
    >
    >
    > This doesn't seem to make a difference for me, the log file
    still contains only c++ side debug prints, qml prints (like
    console.log()) are not handled with messagehandler.
    >
    > Actually I found out that even if set in pro-file:
    > DEFINES +=QT_NO_DEBUG_OUTPUT
    > DEFINES +=QT_NO_WARNING_OUTPUT
    >
    > I still get qml debug prints printed out to console, so it seems
    that those prints from qml are not handled via normal debug
    handling at all?
    >
    > I would like to get no debug printing at all, or then just to file.

    DEFINES in qmake adds additional defines (-D) to the cflags used
    to build C++ affect code compiled with them. QtDeclarative was not
    compiled with these defines, so your adding them won't affect
    console.log (whose C++ implementation lives inside QtDeclarative).

    If you don't want debug prints, you need to install a message
    handler (you say you've tried this and it doesn't work, I can't
    answer why that would be the case, it should work, as it uses the
    same infrastructure).

    BR,
    Robin
    _______________________________________________
    SailfishOS.org Devel mailing list




--
Artem Marchenko
http://agilesoftwaredevelopment.com
http://twitter.com/AgileArtem


_______________________________________________
SailfishOS.org Devel mailing list

_______________________________________________
SailfishOS.org Devel mailing list

Reply via email to