std.experimental.logger formal review round 3

Robert burner Schadek via Digitalmars-d digitalmars-d at puremagic.com
Tue Oct 28 01:38:49 PDT 2014


On Tuesday, 28 October 2014 at 01:37:48 UTC, Martin Nowak wrote:
> On 10/28/2014 12:58 AM, Robert burner Schadek wrote:
>>
>> Disabling a version at CT of the lib has no consequence to 
>> compile units
>> that are not compiled with that version statement.
>
> Yes setting a version in my app has no effect on the library, 
> that's the problem because I cannot disable logging in a 
> library.
> So I'll always have to pay some runtime overhead even though I 
> don't want to use logging.

Actually, that is only true for LogLevel given to a log call at 
runtime. calls to info, trace etc. are guarded with static if. So 
you're not paying any runtime overhead when calling log functions 
with LogLevel build in their name.


More information about the Digitalmars-d mailing list