On Tuesday, 28 October 2014 at 05:44:48 UTC, Andrei Alexandrescu wrote:
Being able to select maximum logging level statically at client application level is a deal maker/breaker for me. The mechanics aren't important but it's likely they will affect the API. So I think that needs to be resolved now, not in a future pull request.

Andrei

please elaborate. It is a must to be able to disable LogLevel when calling the compiler? Xor the opposite?

passing -version=StdLoggerDisableTrace when compiling the user code will yield empty functions (thank you static if) for every call to any function or method having the word "trace" in its name, like for example trace("My log call");

If you call something like log(computeMyLogLevelAtRuntime(), "my log data) and that function returns LogLevel.trace and you haved passed -version=StdLoggerDisableTrace at CT of the user code you will have to pay for one if.

Reply via email to