On Fri, Dec 2, 2011 at 12:21 AM, Bo Thorsen <b...@fioniasoftware.dk> wrote:

> 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.
>

My mistake -- sorry.  Yes, a local LoggerHelper would make it re-entrant
(essential of course).

My original point was to ensure an atomic call to the ultimate logger,
which the syntax didn't suggest (because of multiple calls in the single
expression), but yes, a LoggerHelper would provide.

Apologies for my noise.

As an aside, with the "stream operator" syntax, is there any interest in
supporting "localization" for logging?  The atomic "message-format-string"
we found easier to localize:

"some value %1 exceeds the limit of %2"

--charley
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to