Thread overview | |||||
---|---|---|---|---|---|
|
October 01, 2015 How to use std.experimental.logger? | ||||
---|---|---|---|---|
| ||||
I tried it on Windows today using the latest DMD installer, all default logger and settings. I get: safe function [...].logImplf cannot call system function 'std.format.formattedWrite!(MsgRange, char, Result!()).formattedWrite' How do I make formatted logging work? |
October 01, 2015 Re: How to use std.experimental.logger? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Panke | On Thursday, 1 October 2015 at 08:21:35 UTC, Panke wrote: > I tried it on Windows today using the latest DMD installer, all default logger and settings. > > I get: safe function [...].logImplf cannot call system function 'std.format.formattedWrite!(MsgRange, char, Result!()).formattedWrite' > > How do I make formatted logging work? Would be easier to diagnose your problem if you pasted your code and uncut complaint from the compiler. Anyway, the following works, so it may give you a hint: $ cat log.d import std.experimental.logger; void main() { logf("just log %s and %d", "this", 1337); } $ dmd log.d $ ./log 2015-10-01T11:23:57.291:log.d:main:5 just log this and 1337 |
October 01, 2015 Re: How to use std.experimental.logger? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Adrian Matoga | Ah, I tried to format a custom struct that has a non-pure toString, because std.conv.to isn't pure either, sigh :( |
Copyright © 1999-2021 by the D Language Foundation