[Development] Cake and eating it too for qDebug printing to system log - https://codereview.qt-project.org/89357

Corentin Jabot corentin.jabot at gmail.com
Fri Jul 11 13:20:51 CEST 2014


Looks like there are many different uses cases and point of views, we may
not reach an agreement.

I agree that the default settings should be as unified as possible, but, on
the other and, each platform
having different capabilities, it make sense to set the default behavior on
a platform-per-platform basis;
there are only 2 or 3 possible choices after-all.
II the documentation states explicitly what the behavior is on each platform
and that the behavior is to be expected on that platform, I don't think
people will get confused.

I really think we need a way to override the log output in the application
with an api such as Denis proposed,
in addition to the existing environment variable.

Having a global or per-application file may be to much, things should be
kept simple.

I still don't think qt creator should read the output from the journal when
it can avoid it.
Reading the system log + stdout, merging both in a sane way ( which means
qt creator will have to time stamp the output from stdout)
looks overly complicated to me.
The extra information the journal provide will be lost anyway since Qt
Creator's output is very basic (but, sufficient most of the time).
And if the order in which each line is displayed is inaccurate, it could
make the debugging much harder.
The extra work of reading the journal may also create a delay in the
output, which is annoying when debugging.

The debugging with an other IDE should also work out-of-the-box. It's not
that debugging should be handled specifically,
more like debugging should not be handled differently, compared to any
another application, and the burden should not be put
on the IDE.
That being said, if it comes to this, I have no problem with Qt creator
setting QT_LOGGING_TO_CONSOLE by default.

As for attaching windows applications to their parent's console
automatically, that would be really neat.




2014-07-11 11:25 GMT+02:00 Robin Burchell <robin+qt at viroteck.net>:

> On Fri, Jul 11, 2014 at 11:13 AM, Hunger Tobias <Tobias.Hunger at digia.com>
> wrote:
> > I see why you would want journal data in your output, but I do see a
> > problems making that work for remote debugging/running. Even sailfish is
> > apparently forcing output to stderr when starting applications on-device
> > via Qt Creator.
>
> Don't let our existing solution limit you. There may be better
> solutions, we were time-constrained, and now resource-constrained
> (i.e. we have to pick and choose what we put effort into..) so we
> haven't looked into changing this any more, as far as I know.
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20140711/5a7b410b/attachment.html>


More information about the Development mailing list