Review: std.logger
Jeremy Powers via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jul 14 09:54:47 PDT 2014
>
> There is still a problem: the analogy, that log/logf is similar
> to write/writef, is not right anymore. Please correct me if I'm
> wrong... but AFAIK write converts every argument to string and
> the output device has no mean to choose a preferred
> representation of the arguments.
>
> It will be a surprise if I replace
> log(a, b, c);
> with
> logf("%s%s%s", a, b, c);
> and possibly get different results.
>
If you are just using default logging, they are the same. Point is that it
allows for different results based on logging configuration/implementation.
The logf version says the logging output has to be exactly that string, in
all instances. The other says here is some things I want logged, and the
logging can decide how to output them.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20140714/d44dbc14/attachment-0001.html>
More information about the Digitalmars-d
mailing list