On Saturday, 13 June 2015 at 08:17:24 UTC, extrawurst wrote:

I found one issue using it the last day: It does not seem to be formatting arguments in the XYZf() methods quite the same as writefln. for example an exception object ist not automatically converted to call its .toString() when passing errorf("err: %s",e);
Is that intended or a bug ?

The following must definitely be a bug:

import std.stdio;
import std.experimental.logger;

void main()
{
        writefln("{%04d}", 15);
        infof("{%04d}", 15);
        writefln("{%08d}", 42);
        infof("{%08d}", 42);
}

Result (Linux x86_64, dmd 2.067.1):

$ rdmd logg.d
{0015}
2015-06-13T10:29:25.014:logg.d:main:7 {00015}
{00000042}
2015-06-13T10:29:25.014:logg.d:main:9 {00000000000000000000042}

Reply via email to