[Top][All Lists]

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

Re: [ft-devel] Logging library proposal

From: prince.cherusker
Subject: Re: [ft-devel] Logging library proposal
Date: Tue, 22 Jan 2019 15:10:50 -0000

(disclaimer:  personal opinions and personal preferences ahead!)

> Since I was working on adding support for Windows fonts to Freetype, and I
> to use the Freetype built-in logging facilities probably I could share a
> my own experience of using it. First of all the Freetype logger is
> sufficient for productive work.

It's good to hear that the wheel does not have to be reinvented for current
developers.  Should a new logger happen:  we could think of forwarding
existing macros to the new logger to maintain backwards compatibility (spec.
for developers that know + use the old logger extensively, spec. for quick
debugging stuff)?

> If a developer believes that she/he needs to change the logger of a
> she/he starts to work with - that's good sign that this developer has
> distorted priorities.

"Ease of access" should generally be in everyone's interest.  The easier it
is to contribute to a project the more likely it is that people will
actually do that.  The current logger might be fine if you have worked on
FreeType for a while or are really interested in working on it properly.
However, understanding it takes some time, specifically when you're only
interested in quickly finding/fixing bugs.  When I started to work on FT I
ended up using `printf' whenever I confirmed things quickly.  (I used
FreeType as a library, looking for bugs within FT that I then tracked down).
I only properly started to use FT's current logger when I needed to retrieve
log messages that were already in the code.

> For instance has anyone heard anything about the logger during last years
> GSoC?

I'm not sure what you mean by that.  Are you talking about `glog' and _my_
project ("fuzzers")?

> And next (but not last) thing is that it's possible to redirect stderr to
> file even in Windows GUI mode. So, this platform doesn't need anything
> from Freetype's logger side of things.

This is pretty much exactly the reason behind the "external" logger project:
not having to care about all of that (no matter if you know how stuff works
or not).  Just use a universal logger interface, let it do its work and have
some nice output (wherever, however) :)  And if some distro decides to
introduce a separate stream specifically for logging (sth like `stdlog')
then that's automatically covered for you as well.  Or if a system logs
directly to a printing device via a special system call ...  you can use
every system properly without investing a minute into it.
TL;DR:  logging setup/maintenance should not be maintained by FreeType IMHO.
FT developers should rather be able to _use_ loggers (without thinking about
_how_ or _if_ it works) and invest their time into working on FreeType

Also, I recall some formatting discussions somewhen last year (I don't know
exactly when that was);  IIRC Werner proposed a new output formatting but
ran against a wall there.  The upside of using state-of-the-art loggers is
that they can be tweaked quickly+easily to generate output to everyone's
personal likings (should the defined standard not be good enough to fit a
specific situation).

reply via email to

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