Another Log implementation

David Nadlinger see at klickverbot.at
Mon May 30 08:08:23 PDT 2011


On 5/30/11 4:50 PM, Vincent wrote:
>> I was referring to the post of you I actually cited, where you wrote:
>>
>> ---
>> In this case I prefer snippets like this:
>>
>> // some IO logic
>> version(log_io) logDbg(`SENT: ` ~ line);
>> ---
>>
>> Clearly, you can't activate/deactivate logging at runtime here
>
> You can, see Log.IsEnabled member.

You wrote in response to Jose: »In your case it's IO object - turning ON 
verbosity, you do it for ALL logging, while you need just an IO module. 
What you say on this? :) In this case I prefer snippets like this: […]« 
I don't quite see how you would be able to enable/disable logging 
specifically for the I/O part _at runtime_ in your snippet (the one I 
quoted above), assuming that logDbg is a global logging object not 
specific to the I/O code.

David


More information about the Digitalmars-d mailing list