[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pdf-devel] Logging function
From: |
gerel |
Subject: |
Re: [pdf-devel] Logging function |
Date: |
Mon, 18 Feb 2008 14:22:30 -0300 |
> From: Aleksander Morgado <address@hidden>
>
> I just saw that gerel already started something quite similar in the
> Error module.
>
> http://lists.gnu.org/archive/html/pdf-devel/2007-12/msg00058.html
>
> I guess the logging function could be included directly in the Error module.
>
> gerel, what do you think?
>
Hey aleksander,
Well, I have made an argument related to that before:
http://lists.gnu.org/archive/html/pdf-devel/2007-12/msg00052.html
--- QUOTE ---
the idea I have in mind is to define _general_ error
types and error reporting procedures for describing user-level problems. OTOH
for those errors that aren't of much use to users and are reported for
debugging purposes, instead of filling every source file with:
#ifdef DEBUG
....
#endif
statements I'd suggest to write some procedure/macro let's say "PDF_DEBUG" and
use it on every place needed. And then in case we're compiling source
--with-no-debug just define "PDF_DEBUG" to ' ' (void).
Note that I'm just talking about error reporting here, error checking and
recovering is subject to the caller procedure.
--- END QUOTE ---
In other words, I'd just use two levels to keep it simpler.
Error messages (for the 'user' of gnupdf) and debug messages (for us).
I'd always issue error/warning messages to users, thus, no configure flags.
And for debug flags:
'--with-<layer>-<module>-debug'
Both ideas apply though.
So what do the rest of us think ?
cheers
-gerel