Op 1-12-2011 16:12, Stefano Cordibella schreef:
Hi all,
is the state of the art use the debug functions (qDebug, qWarning,
...) in conjunction with a custom message handler (qInstallMsgHandler)
for log to file system?
I found very simple and useful this approach, but I think that a log
fun
Den 02-12-2011 08:21, Bo Thorsen skrev:
> Den 01-12-2011 22:46, Charley Bay skrev:
>>
>> qLog(Type) << "string=" << str << ", int=" << i;
>>
>> That code is not re-entrant,
>
> Wrong.
>
> class LoggerHelper {
> ...
> ~LoggerHelper() {
> doActualLogging();
> }
> };
>
> LoggerHelper& operator<<(Logge
Den 01-12-2011 22:46, Charley Bay skrev:
>
> qLog(Type) << "string=" << str << ", int=" << i;
>
> That code is not re-entrant,
Wrong.
class LoggerHelper {
...
~LoggerHelper() {
doActualLogging();
}
};
LoggerHelper& operator<<(LoggerHelper&, const T&) {
// Log T here
}
Bo Thorse
On Thu, Dec 1, 2011 at 10:46 PM, Charley Bay wrote:
> That code is not re-entrant, because the "logging object" can be intercepted
> by other threads entering that function.
Not if such objects are local to that thread using QThreadStorage (or
you do other work to make this safe), which I'm prett
Stefano spaketh:
> > is the state of the art use the debug functions (qDebug, qWarning,
> ...) in
> > conjunction with a custom message handler (qInstallMsgHandler) for log to
> > file system?
> > I found very simple and useful this approach, but I think that a log
> function
> > with message
> -Original Message-
> From: interest-bounces+alex.blasche=nokia@qt-project.org
> [mailto:interest-bounces+alex.blasche=nokia@qt-project.org] On
> is the state of the art use the debug functions (qDebug, qWarning, ...) in
> conjunction with a custom message handler (qInstallM
Hi all,
is the state of the art use the debug functions (qDebug, qWarning,
...) in conjunction with a custom message handler (qInstallMsgHandler)
for log to file system?
I found very simple and useful this approach, but I think that a log
function with message level is needed (i.e: qMessage