[phobos] Would like to add std.log to the review queue

Robert Jacques sandford at jhu.edu
Mon Jun 13 10:50:02 PDT 2011


On Sat, 11 Jun 2011 20:49:18 -0400, Jose Armando Garcia  
<jsancio at gmail.com> wrote:
> Hello everyone,
>
> What do I need to do to add std.log to the review queue? The
> implementation is feature complete and it should work in both Windows
> and Linux.
>
> The documentation: http://jsancio.github.com/phobos/phobos/std_log.html
> The code: https://github.com/jsancio/phobos/blob/master/std/log.d
>
> druntime changes:
> https://github.com/jsancio/druntime/commit/06ac77dca29b350b7079929588755e6b15ca52a5
>
> If you want to give the library a try, probably the best thing to do
> is clone my forks. I keep them fairly up to date with the official
> branches. For phobos use the master branch and the branch for druntime
> is log.
>
> Enjoy and thanks,
> -Jose

I've taken a quick look at the API. I notice you've put all the severity  
levels into the public name space. I.e. fatal, error, etc. And the primary  
use of the severity levels is as template arguments to log, i.e.  
log!warning(). This feels like pointless namespace pollution. Is there a  
reason static struct members, i.e. log.warning(), log.error(), etc., or  
free functions, i.e. logWarning() or log_warning(), are inferior solutions?


More information about the phobos mailing list