Logging and Debugging API Overhaul (GSoC 2010)
Redesigning NTP's logging/debugging system will improve ntpd's logging and diagnostic capabilities. It will also give better control over logging/debugging.
A consistent logging interface for NTP and its projects would simplify its codebase and would make it more consistent. It also would benefit other NTP projects like SNTP by giving it acesss to its logging/debugging interface.
All in all it would benefit both developers and users by unifying logging/debugging interfaces under a improved system.
A big part of this project besides coding is designing and planning the improved logging/debugging system as well as coordinating the work necessary to implement these changes.
The basic idea is to have a log record which acts as a repository for the log of all the events.Formatting header is employed to retrieve a particular log from the log record and convert it into the human-readable form.This formatted output is directed to the console or a particular file.
Filtering is the key header file which screens the log messages based on the level set in the config by the user.There are five levels for logging defined namely debug<info<warning<error<critical.Depending on the required level the messages are logged.The basic rule is that a log request of level p is enabled when selected level q,is such that p>=q.This means if info is the selected level of logging,any messages from the level warning/error/critical are seen except debug.