Review: std.logger

Robert burner Schadek via Digitalmars-d digitalmars-d at
Sun Jul 13 07:37:13 PDT 2014

On Sunday, 13 July 2014 at 14:25:42 UTC, Dragos Carp wrote:
> write/writeln are generic functions that are used for producing
> plain-text output in line oriented format (.csv, etc.) or not
> line oriented format (json, xml, etc.). This text is human
> readable, but not necessary user friendly.
> A logging facility need to produce both human readable and user
> friendly messages.
> I would prefer:
>    info("%s is the answer", true);
write infof("%b is the answer", true); and it works write now

> instead of
>    info(true, " is the answer");
> The variant without format specifier also makes the
> internationalization of the log entries almost impossible.
> IMHO these are some good reasons why the logging facility should
> not try to support the variants that the std.stdio with
> write/f/ln provides.

there also good points for it.
* people expect it after using write
* sometimes it is less work typing
* there is no reason to limit it arbitrarily
* ...

More information about the Digitalmars-d mailing list