Voting: std.logger

Martin Nowak via Digitalmars-d digitalmars-d at puremagic.com
Thu Jul 31 20:56:45 PDT 2014


On 07/30/2014 01:09 AM, Robert burner Schadek wrote:
>
> I'm not sure how you except log(LogLevel.xxxx, "Hello world") to be
> disabled at compile time if LogLevel.xxxx is a runtime value? Or do I
> misunderstood you?
>
> you can choose to disable name based logging like trace("Hello trace")
> at CT with the current release

Here is a proof of concept to achieve this.
http://dpaste.dzfl.pl/95fb6a4e086d
It works by creating a different type for each loglevel.


More information about the Digitalmars-d mailing list