[SailfishDevel] how to get qml debug output to file

Artem Marchenko artem.marchenko at gmail.com
Sun Feb 23 23:37:17 UTC 2014


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.burchell at jolla.com>wrote:

> On 04 Feb 2014, at 22:37, Tero Siironen <tero.siironen at iki.fi> wrote:
> > Andrey Kozhevnikov <coderusinbox at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20140224/86887ba5/attachment.html>


More information about the Devel mailing list