Re: [dev][PATCH][quark] Clean up the log-facility [fixed-PATCH]

From: FRIGN <dev_AT_frign.de>
Date: Mon, 3 Mar 2014 22:53:26 +0100

On Mon, 3 Mar 2014 23:28:13 +0000
sin <sin_AT_2f30.org> wrote:

> I don't agree. At the very least have a look at eprintf() from the
> 'The practice of programming'. We are using similar functions in sbase
> and ubase.

In sbase and ubase, this definitely makes sense.
However, what we're dealing with here is a different situation. Quark
requires timestamps and has a unique logging-format. Prepending
"quark:" for each error-line makes the log hard to read and breaks the
concept that every line has a timestamp.
I'd suggest you to test it out yourself and see what works better for
you.

> I do not like that the type of log is passed in as an argument, it should
> just be a separate function.

Well, that's debatable.
In my humble opinion, passing log-types as arguments brings much more
flexibility in case you want to augment the range of possible
log-messages.
If you look at the current solution with separate functions, there is
lots of unnecessary code-duplication.

Cheers

FRIGN

-- 
FRIGN <dev_AT_frign.de>
Received on Mon Mar 03 2014 - 22:53:26 CET

This archive was generated by hypermail 2.3.0 : Tue Mar 04 2014 - 01:00:07 CET