|
From: | Priyesh kumar |
Subject: | Re: tracing and logging library - GSOC Project |
Date: | Thu, 27 Feb 2020 10:14:17 +0530 |
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`.
[Prev in Thread] | Current Thread | [Next in Thread] |