QWebEngine app deploying with console log.
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?
Re: QWebEngine app deploying with console log.
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
Code:
QT_LOGGING_TO_CONSOLE=1
in the program's environment.
Cheers,
_
Re: QWebEngine app deploying with console log.
How I will set this env. variable?
Re: QWebEngine app deploying with console log.
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,
_
1 Attachment(s)
Re: QWebEngine app deploying with console log.
Unfortunately, it does not work. Program was logging like that in 5.12.4 release:
Attachment 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.
Re: QWebEngine app deploying with console log.
Does your .pro file have
Windows is unfortunately very weird when it comes to programs writing to stdout or stderr.
Cheers,
_