On Fri, Jul 11, 2014 at 11:15:26AM -0300, Lisandro Damián Nicanor Pérez Meyer wrote: > As a reminder for ourselves, qtbase is not being built with journald support > in Qt 5.3.x. > > We should not enable this unless upstream finds and codes a way to detect it > on runtime, else users not using journald will not get output.
I wanted to paste a small update on this. It looks like the current code [1] will log to stderr if it has a console attached. Only if stderr is redirected to a file/pipe, it will use another logging backend. There is also an environment variable, QT_FORCE_STDERR_LOGGING, available to always force logging to stderr. But unfortunately there is no matching option in qtlogging.ini configuration file. Currently we have no other backend available. Quoting from the latest qtbase build log: Logging backends: journald ............................. no syslog ............................... no slog2 ................................ no We could easily enable syslog backend if we built with -syslog configure option. However, as the recent examples [2] have shown, this can break tests in third-party packages. These tests may run code with qDebug/qWarning/etc lines, and expect it to print something to stderr (which would not be a console in this case). So in my opinion we should not enable custom logging backends, unless there is an option to disable them by default, and let users opt in to using them with an environment variable or a configuration file. Qt binaries provided by the Qt project are also built without any logging backend enabled. [1]: https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/global/qlogging.cpp?h=5.11#n287 [2]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=886437 -- Dmitry Shachnev
signature.asc
Description: PGP signature