PDA

View Full Version : QWebEngine app deploying with console log.



sharofiddin
26th August 2019, 19:18
I moved from Qt 5.12.4 to Qt 5.13. I am working on QWebEngine based app. Formerly, I have deployed my app with console log window, so whenever app started console logging was also starting. But in 5.13 this does not happen. How can I deploy my app with console logging feature?

anda_skoa
27th August 2019, 10:03
Qt can be built with support for system logging facilities, such as Unix syslog, Linux journald or Windows debug logger.

Maybe the build option chosen for your two versions were different.

You should be able to force console logging using



QT_LOGGING_TO_CONSOLE=1


in the program's environment.

Cheers,
_

sharofiddin
27th August 2019, 12:54
How I will set this env. variable?

anda_skoa
27th August 2019, 18:43
Inside the application code for example with [URL="https://doc.qt.io/qt-5/qtglobal.html#qputenv"]qputenv/URL].

In the actual program environment depends on how you launch it.

In QtCreator and other IDEs there is usually a runtime setting for that, when launched from a shell it can be set there, when launched from a desktop link it might be possible to set it there

Cheers,
_

sharofiddin
28th August 2019, 09:05
Unfortunately, it does not work. Program was logging like that in 5.12.4 release:
13250.
However when I start the program from gitbash it writes logs in the console, but if I start it from cmd or power shell logs do not appear.

anda_skoa
28th August 2019, 09:41
Does your .pro file have



CONFIG += console


Windows is unfortunately very weird when it comes to programs writing to stdout or stderr.

Cheers,
_