std.experimental.logger formal review round 3
Martin Nowak via Digitalmars-d
digitalmars-d at puremagic.com
Sun Oct 26 16:58:02 PDT 2014
On 10/27/2014 12:45 AM, Martin Nowak wrote:
> If you allow to define a Logger with a LogLevel know at compile time and
> you statically pass the LogLevel of your message to the logging function
> you can elide that call. For anything else you need a runtime check.
You are trying to globally define a LogLevel through the version
identifier but that collides with D's separate compilation.
So you cannot enable logging in a library that was compiled with
StdLoggerDisableLogging. And vice versa you cannot statically disable
logging in a library compiled without StdLoggerDisableLogging.
Now if you use StdLoggerDisableLogging in your program the effect on the
library will depend on whether or not you're calling a templated
function or if the compiler inlined certain library function into your
program.
More information about the Digitalmars-d
mailing list