std.log available for viewing

Jose Armando Garcia jsancio at gmail.com
Sun May 29 17:06:57 PDT 2011


That is a valid point. I think if we add critical and put a suggestion
in the doc that fatal should only be used in extreme cases because it
cannot be disabled. Then that should solve the problem. Going from
fatal to critical to error is only a regular expression away.

On Sun, May 29, 2011 at 5:57 PM, Brad Roberts <braddr at puremagic.com> wrote:
> On 5/29/2011 8:44 AM, Andrei Alexandrescu wrote:
>> 1. The fatal log should never be stripped. This is because execution of code after using fatal depends on compile-time
>> flags, which is unacceptable. Logging to fatal should terminate the application regardless of circumstances. Otherwise
>> people would need to write things like:
>>
>> fatal("blah");
>> assert(0, "Execution cannot continue even though logging is stripped");
>>
>> This is needless and bug-prone. Fatal is fatal.
>
> At one time I used a log framework that included this behavior.  After a couple years, I came to greatly regret it.
> Fatalness down in libraries became overused, particularly in layers that were libraries.  In some ways it was abuse of
> fatal for things that shouldn't have been, but it's mere existence encouraged it's use.
>
> I really don't think it's the log libraries job to implement app termination behavior.
>
> My 2 cents,
> Brad
>


More information about the Digitalmars-d mailing list