On terça-feira, 21 de fevereiro de 2012 10.02.23, [email protected] wrote:
> So how about adding another QtMsgType called QLogMsg, that qLog() uses? In
> contrast to qDebug/QtDebugMsg, qLog/QtLogMsg messages would not be
> processed by default, unless the configuration file (or an environment
> variable) says so ...

That's almost a necessity. An informative message is not debugging.

>From sys/syslog.h:
#define LOG_EMERG       0       /* system is unusable */
#define LOG_ALERT       1       /* action must be taken immediately */
#define LOG_CRIT        2       /* critical conditions */
#define LOG_ERR         3       /* error conditions */
#define LOG_WARNING     4       /* warning conditions */
#define LOG_NOTICE      5       /* normal but significant condition */
#define LOG_INFO        6       /* informational */
#define LOG_DEBUG       7       /* debug-level messages */

We don't have EMERG and ALERT because Qt applications (often) aren't system
applications and can't cause those conditions. And we don't have NOTICE or
INFO because our message output was designed only for developer usage (from
developers to other developers).

That also reminds me: some systems would benefit from having our message output
go to syslog. MeeGo had a patch that I wrote a long time ago that sent all
messages to syslog.

--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to