On 23 Dec 2013, at 17:38, [email protected] wrote: > From: Andreas Aardal Hanssen <[email protected]> > Subject: Re: [Development] [Request] Add Info to QDebug > Date: 23 Dec 2013 15:17:06 GMT+1 > To: [email protected] > > FTR, I’m completely -1 for touching QDebug and friends, and +1 for adding a > proper logging framework. QDebug, qWarning, qCritical and qFatal are for > programmers, not administrators who want app log output for system > maintenance. > I think that QDebug can be a sound foundation for a ‘proper’ logging framework.
> In our app environment, we have (as many else!) added our own Log<Info>() << > “bar”, which formats the log output according to our system-wide standard. > That makes the logs parseable to all our internal tools. We also override > Qt’s debug handlers to ensure that any use of qDebug, warning, critical or > fatal ends up properly formatted. I.e. the the debug handler uses our Log > thing. So, programmers log messages do finally end up in the logs. By using qSetMessagePattern it is possible to format the log output as well. By only using q(C)Debug(), q(C)Info(), … there is a single API to do logging. By implementing a proper logging backend, Qt could have plugins to log to (r)syslog(-ng), Windows Event Log, slog2, aso, and then there would be an almost perfect fit for qDebug(), qInfo(), ... Kurt
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
