[liblouis-liblouisxml] Re: Preparing logging branch for inclusion

  • From: Mesar Hameed <mesar.hameed@xxxxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Mon, 12 May 2014 14:37:11 +0200

Hi,

On Mon 12/05/14,12:48, Michael Whapples wrote:
> I have started on moving the logging code into logging.c.
> 
> The removing of printf statements is less clear, I question whether
> some of those may be more desirable left as printf to stderr, (eg.
> out of memory messages).

Feel free to leave the once that look questionable to you, but at least we know 
that you have actively considered them for
conversion.

You triggered a new todo item :)
http://issues.liblouis.org/todo/replace_manual_memory_checks_with_gnulib_xmalloc/

> Do people agree with that or do they feel it should go in logging
> and the controlling application decides how to show Error, Warning
> or Fatal messages from log (eg. for a gui application stderr
> probably doesn't make sense).

If the code only uses our logging its probably simpler, then we have one point 
of redirection.
If we have an application that needs errors to stderr, and everything
else directed elsewhere, then it just means that they have to deal with
this in the logging function that they register.
So in Keiths example, he would only have to write a modified logging
function, rather than doing a lot of edits throughout the code.

thoughts?
Mesar

Attachment: signature.asc
Description: Digital signature

Other related posts: