freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tracing and logging library - GSOC Project


From: Werner LEMBERG
Subject: Re: tracing and logging library - GSOC Project
Date: Tue, 25 Feb 2020 07:30:33 +0100 (CET)

Hello Priyesh!


Thanks for your interest in FreeType.

>    [...] Therefore, I propose to implement separate code files for
>    logging, which could be based on C++ and can be easily plugged
>    into the existing C code base.  In addition to this, improving a
>    bit on documentation can contribute to better understating of
>    existing logger codebase.

I'm not sure I like this.

Debugging is at the very heart of FreeType.  Assume that you have to
identify a bug, and you work in an environment for an exotic platform
that only provides an (old) CĀ compiler.  Your suggestion implies that
you no longer can activate debugging output at all on such a platform!

In other words, my gut feeling says no to the idea of using any
different code language.  The logging facility should be written in
the CĀ language, too, not using more recent features than C99 so that
older compilers support it.

> Based on above points, all these changes could be done without
> embedding an external library.  Having said that, if it is really a
> requirement to replace the current logging facility with an external
> one, there is an external C based logging library named "Zlog"
> already been discussed on mailing list here
> <https://lists.nongnu.org/archive/html/freetype-devel/2019-01/msg00023.html>.
> I can work on it and explore other available external library
> option.

It's not a *requirement* to use an external logging library (inspite
of the project's name), but there are good arguments to not re-invent
the wheel.  In particular, it can be expected that a well-maintained
external library gets a lot of testing and comes with a mature API.


    Werner


PS: The current use of the debugging macros are documented in
    `doc/DEBUG`.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]