std.logger
Robert Schadek
realburner at gmx.de
Fri Aug 23 14:45:26 PDT 2013
On 08/23/2013 10:08 PM, Jonathan M Davis wrote:
> On Friday, August 23, 2013 21:47:44 Johannes Pfau wrote:
>
>> Make the templated function a stub which redirects to a function which
>> uses normal function arguments and rely on inlining?
> Inlining will have no effect on __FILE__ and __LINE__, and it would be a bug if
> it did, because they're supposed to give the file and line number of the source
> code, whereas inlining only affects the generated binary.
>
> - Jonathan M Davis
I think I came up with something good looking. A regex explains it best.
log // still returns the default logger
(LOGGER\.)?log\((LOGLEVEL,)? (CONDITION,)? (MESSAGE)?\) // normal
logging without template bloat
(LOGGER\.)?logf\((LOGLEVEL,)? (CONDITION,)? (MESSAGE), (ARGS,)*\) //
printf logging with templates bloat
I push the changes and the new docu (which needs some more work). Good
night everybody.
More information about the Digitalmars-d
mailing list