Hi ,I am Priyesh , currently pursuing B.Tech in Computer Science at Indian Institute of Information Technology Una , India . Currenlty, I am a third year student and interested in working on Freetype's GSOC Project - "Replace FreeType's tracing and debugging facilities with an external logging library". Following are my observations with the project mentioned above:
Per me, the current logger is doing a great job and has been implemented based on well thought design. However, I see a few enhancements that can be made on top of it:
- Firstly, since FreeType being a C library, most of its logger codebase is based on Macros. This adds complexity in debugging and reduces code readability to some extent. Sometimes, it is hard to understand the code and underlying design. Today we have more powerful C++ features available which can be used to enhance the code and add to the readability and easy debugging. 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.
- Another issue as already mention in the project problem statement is its limitation to writing logs only on standard error. This need to be generalised and to be extended for multiple platforms. I propose to extend the existing code and write a C++ based code which could enable it for multiple platforms and could be easily plugged into the current C code base. To be precise, it would be "FT_Message" API which would be invoking new code for logging messages to a file.
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. I can work on it and explore other available external library option.
Please guide me if my approach is in the right direction. Any suggestions are welcome.