Voting: std.logger
Martin Nowak via Digitalmars-d
digitalmars-d at puremagic.com
Fri Oct 24 04:28:05 PDT 2014
On Friday, 8 August 2014 at 09:16:11 UTC, Robert burner Schadek
wrote:
> could you elaborate please? Currently I use the version
> statements in two template functions. I'm not sure why one
> would brand this negatively as a leak into the library.
>
For example we don't reinstatiate templates if they are
instantiated in an imported module. But that module might have
been compiled with different settings.
> Thank you for taking the time, but I found several conceptional
> problems with that POC. The worst being that if I make the
> LogLevel inside the TestLogger anything other than a enum it
> fails, as it is used in the template constraint. That would
> mean the LogLevel is fixed at CT.
Well if your test logger only knows it's log level at runtime,
then you obviously can do the comparison only at runtime. You can
solve this by checking whether minLogLevel is a compile time
constant in the log constraints adding another overload for
runtime configurable log levels.
More information about the Digitalmars-d
mailing list