freetype-devel
[Top][All Lists]
Advanced

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

Re: Logging Library-GSOC


From: Werner LEMBERG
Subject: Re: Logging Library-GSOC
Date: Sat, 23 May 2020 08:41:00 +0200 (CEST)

Hello Priyesh,


> Clearly there is some problem with the current logger, but I think
> the requirements which are mentioned on the FreeType's GSoC page and
> the requirements which are discussed being here are different...

I don't think so.  It's only that David T. is back, and he wasn't part
of the earlier discussions that we had some time ago :-)

> Please could you guys guide me with the actual requirements as there
> is very little time left for coding to begin...

Don't worry about the timing; investigating what to use and how is
*part* of GSoC.

Irrespective of that, Armin has added some quite useful things that I
haven't thought before, and which are definitely worth to be
considered and implemented.

To summarize: I want an improved logging facility that ideally doesn't
change how errors are marked within the FreeType source code (i.e.,
continued use of `FT_TRACEx`).  However, it should provide
possibilities to adapt the debugging output data to various needs.

1. Flexible formatting of the messages, for example

   a. Displaying the tracing component (i.e., the value of the
      `FT_COMPONENT` macro), and
   b. Showing a time stamp.

2. Modifying the output stream at runtime.

   a. Dynamic change of desired output log levels.
   b. Dynamic log redirection.

3. Hide platform-specific logging details from FreeType.

All of this should be configurable either with a config file or with
environment variables.  I'm not sure how itemĀ 2 can be handled best;
if this feature is active it maybe makes sense to force re-reading of
environment variables and config files as sonn as a FreeType API
function is called.

To avoid library dependencies, the following seems appropriate.

1. The logging library should be statically linked with FreeType.
2. Its source should be distributed with the FreeType source code
   bundle: It gets imported into the FreeType git repository as a git
   submodule, and `make dist` should add it to the distribution
   tarball.

In case there isn't a library that fits our needs, or that cannot be
easily adapted to the desired purposes, it's necessary to investigate
how to implement at least a part of the above ideas directly in
FreeType.


    Werner

reply via email to

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