Review of Jose Armando Garcia Sancio's std.log

Jose Armando Garcia jsancio at gmail.com
Tue Mar 6 09:09:26 PST 2012


On Thu, Mar 1, 2012 at 6:38 AM, H. S. Teoh <hsteoh at quickfur.ath.cx> wrote:
> On Thu, Mar 01, 2012 at 10:09:28AM +0100, Mikael Lindsten wrote:
>> On Monday, 27 February 2012 at 18:10:15 UTC, Kalle Svensson wrote:
>> >* I agree that it is a good idea just to use few log levels.
> [...]
>> I second what Kalle Svensson is saying.
>>
>> My belief is that when there are many log levels, people don't use
>> them as intended or only use a subset of them, often a combination.
> [...]
>
> I used to think that the more log levels, the better. But later, based
> on what I observe in real-life projects, I see that most people don't
> bother trying to figure out what each log level means (they are too lazy
> / busy to read the docs) so they just randomly pick one that "sounds
> right" (which usually is equal to "totally wrong"). Let this happen for
> a few iterations of the software, and you end up with so many wrong
> level messages that the whole log level system basically becomes
> useless. This problem gets worse proportionally to the number of people
> on the project.
>

Agreed. I have recently extended this to hierarchy. Most of the time
you don't want to deal with the complexity of using and configuring a
hierarchical logger. Most programs/system want to enable logging
across the board. From my experience is only in very critical areas
where you want to increase and decrease logging for that component.

An example that comes to mind are inputs and outputs to a
system/program. Which may be expensive to log in production but which
you want to record during testing. This is why the library includes
vlog. To allow the developer and system admin to increase logging for
a specific module.

Thanks,
-Jose

>
> T
>
> --
> What's a "hot crossed bun"? An angry rabbit.


More information about the Digitalmars-d mailing list