During this season of giving, you can show your support for the NTP Project by making a donation to Network Time Foundation.

Logging and Debugging API Overhaul (GSoC 2010)

Summary

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.

Related Items:

Design:

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.

Timeline

Date Task Description % Done
100426
 
Accepted student proposals announced on the Google Summer of Code 2010 site.
DONE
24 Apr-24 May
Community Bonding
Spent time to familiarize with the source,read documentation and understood the logging/debugging system currently available
 
25 May-30 May
DPRINTF,NLOG,msyslog
tested and tried to understand how the functions work.Tried tracing back log messages by running ntpd in -D2 and -D4
 
30 May-6 Jun
loopstats,peerstats,ntplog design
Learnt loopstats,peerstats from an illustrated graph.Tried to make an intial design of the ntplog() function which is an unification of NLOG,DPRINTF and msyslog
 
7 Jun-15 Jun
coding ntplog()
developed the function ntplog() and starting to modify NLOG()
 
15 Jun-13 Jul
Logging System Design and implementation
worked on designing the logging system and implementing it
 
12 Jul-16 Jul
Mid-term evaluations
Submit codes for mid-term evaluation
 
9 Aug
Wrap-up
Suggested 'pencils down' date. Take a week to scrub code, write tests, improve documentation, etc
 
16 Aug-20 Aug
Final Evaluations
Submit codes for final evaluations
 
30 Aug
Code Submission
Submission of code samples to Google
 

Discussion and Comments

 
Topic revision: r5 - 06 Oct 2022, DruLavigne
Copyright © by the contributing authors.Use of this website indicates your agreement with, and acceptance of, the PrivacyPolicy, the WikiDisclaimer, and the PrivateWebPolicy.