std.log available for viewing

Jacob Carlborg doob at me.com
Sun May 29 11:32:48 PDT 2011


On 2011-05-29 17:06, Andrei Alexandrescu wrote:
> On 5/29/11 5:07 AM, Jacob Carlborg wrote:
>> Why is everyone that contribute with a std.log implementation keep
>> insisting that it should be configured via command line options? This is
>> not how a library should be configured, it should be configured via
>> regular methods like the rest of Phobos. If an application wants to set
>> logging options via the command line then that's up to the application
>> to implement.
>
> I think that's because command-line configuration is very commonly
> required for logging. (Programmatic configuration should be allowed as
> well.)
>
> Though logging is useful for a variety of applications, it is vital to
> headless servers. Having a unified convention for command-line
> configurability is a boon for deployment tools.
>
>> I don't like the abbreviations, "vlog" and "dfatal". I first thought you
>> had an error in the documentation when I saw "fatal" and "dfatal". I
>> would suggest "verbose" and "debugFatal", it's clear what they mean and
>> it's consistent with how the other logging levels are named. There's
>> always the option to alias a method for the users.
>
> I instantly recognized "vlog" as "verbose log" and "dlog" as "debug
> log". We arguably don't need the latter as "debug log" is quite light,
> and I don't see "vlog" a tenuous term to learn and use. A lot of terms
> could go any number of ways though.
>
>
> Andrei

I also recognized "vlog" as "verbose log" but the first time I saw 
"fatal" and "dfatal" I actually though there was a mistake. We have this 
great language construct, alias, in D, why not take advantage of it? 
Name the functions clear and consistent without any unnecessary 
abbreviations and let the user of the library create alias if he/she 
wants to.

Why shouldn't "error" be named "elog" and "info" be named "ilog"? To me 
it seems that "vlog" is just a random pick for using a abbreviated name.

Sometimes you are very consistent but other times you just want to go 
with the shortest. Why can't we have it consistent?

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list