<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
working fine for both cpp and qml output<br>
<br>
<div class="moz-cite-prefix">On 24.02.2014 05:37, Artem Marchenko
wrote:<br>
</div>
<blockquote
cite="mid:CAH3UTb5aix1w7smuR9rQTUOX_Pmdee3OD+aCBFY=cnqOLqrUdQ@mail.gmail.com"
type="cite">
<div dir="ltr">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.
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>It would be nice to have some logs-to-file way working in
production with both QML and c++ logs indeed.</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Artem.</div>
<div><br>
</div>
</div>
<div class="gmail_extra">
<br>
<br>
<div class="gmail_quote">On Wed, Feb 5, 2014 at 4:58 PM, Robin
Burchell <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:robin.burchell@jolla.com" target="_blank">robin.burchell@jolla.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="">On 04 Feb 2014, at 22:37, Tero Siironen <<a
moz-do-not-send="true"
href="mailto:tero.siironen@iki.fi">tero.siironen@iki.fi</a>>
wrote:<br>
> Andrey Kozhevnikov <<a moz-do-not-send="true"
href="mailto:coderusinbox@gmail.com">coderusinbox@gmail.com</a>>
kirjoitti 4.2.2014 kello 23.14:<br>
><br>
>> This is messages handler i'm using in my
projects:<br>
><br>
><br>
> 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.<br>
><br>
> Actually I found out that even if set in pro-file:<br>
> DEFINES +=QT_NO_DEBUG_OUTPUT<br>
> DEFINES +=QT_NO_WARNING_OUTPUT<br>
><br>
> 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?<br>
><br>
> I would like to get no debug printing at all, or then
just to file.<br>
<br>
</div>
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).<br>
<br>
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>
<br>
BR,<br>
Robin<br>
<div class="HOEnZb">
<div class="h5">_______________________________________________<br>
SailfishOS.org Devel mailing list<br>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
Artem Marchenko<br>
<a moz-do-not-send="true"
href="http://agilesoftwaredevelopment.com" target="_blank">http://agilesoftwaredevelopment.com</a><br>
<a moz-do-not-send="true" href="http://twitter.com/AgileArtem"
target="_blank">http://twitter.com/AgileArtem</a>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SailfishOS.org Devel mailing list</pre>
</blockquote>
<br>
</body>
</html>