You are not logged in.

#1 2025-11-28 19:46:13

jronald
Member
Registered: 2022-05-09
Posts: 213

[SOLVED] Why does Qt Creator make Qt logging redirect to journalctl?

By default, Qt logging redirects to journalctl instead of "Qt Creator/Application Output".
I think it's not intuitive, and more footprints, so why?

BTW, for it to output in "Qt Creator/Application Output" again, "QT_ASSUME_STDERR_HAS_CONSOLE=1" should be defined in Run Environment.

Last edited by jronald (2025-11-30 01:57:52)

Offline

#2 2025-11-28 20:19:55

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,672

Re: [SOLVED] Why does Qt Creator make Qt logging redirect to journalctl?

You might want to adjust the title to stress that you're talking about QtCreator.
Subject came up before, including some bugs around qtcreator back then: https://bbs.archlinux.org/viewtopic.php?id=259035

The entire thing is btw. excessively configurable, https://doc.qt.io/qt-6/qloggingcategory … ging-rules

Why QtCreator behaves like this by default (if it still does) you'd better ask it's authors - most people here aren't mind-readers.

Offline

#3 2025-11-29 01:23:59

jronald
Member
Registered: 2022-05-09
Posts: 213

Re: [SOLVED] Why does Qt Creator make Qt logging redirect to journalctl?

For Ubuntu, it outputs to "Qt Creator/Application Output" by default. See https://forum.qt.io/post/834095

Last edited by jronald (2025-11-29 01:24:18)

Offline

#4 2025-11-29 08:53:00

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,672

Re: [SOLVED] Why does Qt Creator make Qt logging redirect to journalctl?

I'm not sure what you're trying to say or want ( https://deepl.com/ ) but arch doesn't pre-configure the system for you and https://gitlab.archlinux.org/archlinux/ … type=heads doesn't look like it's using any non-default build options (or patches) that would alter anything about the QtCreator behavior

Offline

#5 2025-11-30 01:57:32

jronald
Member
Registered: 2022-05-09
Posts: 213

Re: [SOLVED] Why does Qt Creator make Qt logging redirect to journalctl?

It's the default behaivor of Qt, https://doc.qt.io/qt-6/qtlogging.html#qDebug

qDebug(const char *format, ...)
Logs debug message format to the central message handler.

BTW
It's just not intuitive to me, and also leave unnecessary footprints.
In fact I'm choosing a GUI lib among Qt, wxWidgets and a native one.
So I'd like to consider the favor of the libs, e.g. I prefer QtCharts to QtGraphs, but QtCharts has been deprecated.

Last edited by jronald (2025-11-30 01:58:11)

Offline

#6 2025-11-30 09:59:19

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,672

Re: [SOLVED] Why does Qt Creator make Qt logging redirect to journalctl?

also leave unnecessary footprints.

Unless it detects a TTY… what's the alternative suggestion? Printing to some random file?
Provided it marks the right severity this won't be displayed or even logged if you disable info logging.

Afaict the only problem is qtcreator which doesn't redirect it to its internal console. I would agree that that's a (long standing) qtcreator bug.

So I'd like to consider the favor of the libs, e.g. I prefer QtCharts to QtGraphs, but QtCharts has been deprecated.

What does that have to do with anything?

Offline

#7 2025-11-30 11:12:59

jronald
Member
Registered: 2022-05-09
Posts: 213

Re: [SOLVED] Why does Qt Creator make Qt logging redirect to journalctl?

seth wrote:

Unless it detects a TTY… what's the alternative suggestion? Printing to some random file?
Provided it marks the right severity this won't be displayed or even logged if you disable info logging.

Afaict the only problem is qtcreator which doesn't redirect it to its internal console. I would agree that that's a (long standing) qtcreator bug.

The suggestion is to make the priority of output as below:
1. "Qt Creator/Qt Application" (no footprint)
2. console (no footprint)
3. journalctl(linux) / DebugView(Windows)

BTW, as https://forum.qt.io/post/834138 said: "this behaviour is specifically in the Arch pre-built".

So I'd like to consider the favor of the libs, e.g. I prefer QtCharts to QtGraphs, but QtCharts has been deprecated.

What does that have to do with anything?

While choosing a lib, I think individual preference is also under consideration.

Last edited by jronald (2025-11-30 20:34:57)

Offline

#8 2025-11-30 16:14:13

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,672

Re: [SOLVED] Why does Qt Creator make Qt logging redirect to journalctl?

BTW, as https://forum.qt.io/post/834138 said: "this behaviour is specifically in the Arch pre-built".

Arch simply builds the upstream default - so I don't really understand that position. "Our defaults are stupid but most distros fix it downstream"?
You can file a bug against the package to change the qtcreator build away from the defaults but I'd not hold my breath - the general stance will be "if this is a problem it needs to be fixed upstream first and foremost"

Offline

#9 2025-11-30 20:37:18

jronald
Member
Registered: 2022-05-09
Posts: 213

Re: [SOLVED] Why does Qt Creator make Qt logging redirect to journalctl?

seth wrote:

Arch simply builds the upstream default - so I don't really understand that position. "Our defaults are stupid but most distros fix it downstream"?
You can file a bug against the package to change the qtcreator build away from the defaults but I'd not hold my breath - the general stance will be "if this is a problem it needs to be fixed upstream first and foremost"

I like the way arch does, keep it simple.
I'll report it to Qt.
Thanks

Last edited by jronald (2025-11-30 20:37:39)

Offline

#10 2025-12-01 08:18:09

jronald
Member
Registered: 2022-05-09
Posts: 213

Re: [SOLVED] Why does Qt Creator make Qt logging redirect to journalctl?

Offline

Board footer

Powered by FluxBB