Review of Jose Armando Garcia Sancio's std.log

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Mar 11 15:28:44 PDT 2012


On 3/11/12 4:49 PM, David Nadlinger wrote:
> Unfortunately, the discussion has ground to a halt again, so consider
> this a friendly reminder that there is still one day left until the end
> of the review period.
>
> David

I thought more about the point made about mixing throwing and logging 
levels. I agree that it's awkward to e.g. log to critical without 
throwing etc. I personally think in that case you really want the error 
log, but hey, point taken.

Here's a suggestion:

* Don't throw from the critical log and don't abort from the fatal log.

* Define the logging functions such that logging an exception will log 
its toString() and then throw the exception.

* Regarding static import log = std.log, I suggest we keep course.

Works?


Andrei


More information about the Digitalmars-d mailing list