[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pdf-devel] Logging function
From: |
jemarch |
Subject: |
Re: [pdf-devel] Logging function |
Date: |
Tue, 19 Feb 2008 10:48:02 +0100 |
User-agent: |
Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/23.0.60 (x86_64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
> I would not use several log levels. The library is not expected to
> emit traces except for debugging purposes or to notify fatal errors.
I agree. As the logs are intended only for the developers, there is no
real need to have different levels.
>
> /* Main logging function */
> void pdf_log(enum pdf_log_level_e log_level,
> enum pdf_log_type_e log_type,
> const char *str_template,
> ...);
>
> I like gerel's proposal to use a conditional macro `PDF_DEBUG' (or a
> set of macros `PDF_DEBUG_*' if we implement several logging scopes)
> that may expand to the empty string.
Yes, probably a simple macro per module/layer would be enough.
Ok.
Gerel, do you agree with this solution?
If you do agree, please update the error module wiki page with a
description of this new functionality and then implement it in
pdf-error.[ch]