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

Thiago Macieira thiago.macieira at intel.com
Fri Jul 11 01:08:20 CEST 2014

On Friday 11 July 2014 00:27:51 Alejandro Exojo wrote:
> Would it be too problematic to make the environment variable 
> (QT_LOGGING_TO_CONSOLE, which already is in use) accept also a "2" for
> logging  to both sources?

Problematic, no. It can be easily implemented.

But it's an option we discarded. It makes no sense to log to both 
destinations. If you're using a tool that can read the syslog, then it doesn't 
matter which one it was sent to, but it will be a problem if you send to both. 
If you're using a tool that can't, then you want to send to stderr only.

> To me, the really interesting feature of providing such code inside of Qt
> is  to enable it without having to touch legacy/third party code. Having it
> for your application is also nice, but you'll likely need to override it
> somehow to integrate it with your configuration or UI.

If you have legacy, set to 1.

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

More information about the Development mailing list