LogLevel [was std.experimental.logger formal review round 3]

Robert burner Schadek via Digitalmars-d digitalmars-d at puremagic.com
Fri Dec 5 04:30:28 PST 2014


On Friday, 5 December 2014 at 10:30:08 UTC, Dicebot wrote:
> On Thursday, 4 December 2014 at 14:32:27 UTC, Daniel Murphy 
> wrote:
>> FWIW I don't really like this - it feels like a hack.  I'd 
>> rather just declare a private logger alias (or something like 
>> that) and use that in the library.  Decision can be made at 
>> compile time, doesn't require reverse module imports, doesn't 
>> depend on global versions.
>>
>> eg
>>
>> alias libraryLogger = 
>> std.logger.FilteredLogger!(LogLevel.info);
>
> I agree with Daniel here. It feels like seeking for too much 
> magic just because it is cool - while more simple and 
> straightforward approach can do the job as well.

Yes simpler is better, if it works. As discussed twice already, 
an approach like:
alias libraryLogger = std.logger.FilteredLogger!(LogLevel.info);
will not work.

Currently I think the best solution is Martin's idea with my mod. 
The complexity of the task to accomplish does not simple go away. 
Unless you cut features which we can't do to keep the generality 
of the library. And that is the main goal after all.


More information about the Digitalmars-d mailing list