std.logger

Gary Willoughby dev at nomad.so
Fri Aug 23 10:21:33 PDT 2013


On Friday, 23 August 2013 at 16:49:00 UTC, Robert Schadek wrote:
>> I like the formatting that sprintf gives.
> I do as well, but this will lead to template bloat, as many 
> people will
> tell you, and log("device id: %s".format(device.id)); is
> not so bad.

I don't think you can bloat a simple logger too much with 
templates. It's a pretty simple framework.

The problem is that people rarely want to log only strings and 
not supporting other types will lead to this:

logger.info(format("Device id: %s"), device.id);

as i found when i started logging stuff. yuk!


More information about the Digitalmars-d mailing list