Review of Jose Armando Garcia Sancio's std.log

Jacob Carlborg doob at
Mon Feb 13 23:47:03 PST 2012

On 2012-02-14 00:37, so wrote:
> On Monday, 13 February 2012 at 15:50:05 UTC, David Nadlinger wrote:
>> There are several modules in the review queue right now, and to get
>> things going, I have volunteered to manage the review of Jose's
>> std.log proposal. Barring any objections, the review period starts now
>> and ends in three weeks, on March 6th, followed by a week of voting.
>> ---
>> Code:
>> Docs:
>> Known remaining issues:
>> - Proof-reading of the docs is required.
>> - Not yet fully tested on Windows.
>> Depends on:
>> (will be
>> part of 2.058)
>> ---
>> Earlier drafts of this library were discussed last year, just search
>> the NG and ML archives for "std.log".
>> I think getting this right is vitally important so that we can avoid
>> an abundance of partly incompatible logging libraries like in Java.
>> Thus, I'd warmly encourage everyone to actively try out the module or
>> compare it with any logging solution you might already be using in
>> your project.
>> Please post all feedback in this thread, and remember: Although
>> comprehensive reviews are obviously appreciated, short comments are
>> very welcome as well!
>> David
> Good work.
> One suggestion. Instantiating a template for each log rather verbose for
> such common thing. I suggest:
> (Just to demonstrate)
> alias global_logger!sev_info info;
> alias global_logger!sev_warning warning;
> alias global_logger!sev_error error;
> alias global_logger!sev_critical critical;
> alias global_logger!sev_dfatal dfatal;
> alias global_logger!sev_fatal fatal;
> As we are pulling severity levels to global namespace anyway, this will
> save us some verbosity and the keyword "log".

It would then be possible to use renamed imports to have something like 

import log = std.log;"foo");

Which looks quite nice I think.

/Jacob Carlborg

More information about the Digitalmars-d mailing list