Review: std.logger
Dragos Carp via Digitalmars-d
digitalmars-d at puremagic.com
Sun Jul 13 13:13:22 PDT 2014
> Basically, limiting to string format logging limits to thinking
> of logging
> as purely strings. Using an API of 'list of items' decouples
> it to the
> more abstract 'logging stuff', with the actual string only
> mattering for
> final output.
This is really valid point.
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.
More information about the Digitalmars-d
mailing list