file and debug info all in one place?
user1234
user1234 at 12.de
Sat May 25 19:54:28 UTC 2019
On Saturday, 25 May 2019 at 19:29:25 UTC, Amex wrote:
> __FILE__, __LINE__, etc...
>
> we have to use these as template parameters
>
> Why not just make every function have this info available in a
> "hidden" struct? No need to mess around with any extra bloating
> of the function signature.
rather log when you enter a function, this will be more simple in
your case
enum lg =
`writeln(__FILE_FULL_PATH, "(", __LINE__, "): enter",
__PRETTY_FUNCTION__);`;
and put
mixin(lg);
in your functions.
or use std.experimental.logger which does more or less the same
when you just log() without supplemental args.
More information about the Digitalmars-d
mailing list