Click here to Skip to main content
12,883,460 members (44,283 online)
Click here to Skip to main content
Add your own
alternative version


17 bookmarked
Posted 3 Mar 2004

Low-level-interference logging

, 1 Mar 2006
Rate this:
Please Sign up or sign in to vote.
Low-level-interference logging.


This DLL provides the routines necessary to achieve low-level-interference run-time textual logging. For a real-time program to log events directly without affecting the execution timings is problematic. This DLL provides a buffered array, which is written to by any of the program threads. This array is output to secondary storage and optionally a screen, by a ‘dedicated’ thread, on a lower priority than the ‘real-time’ threads. The logs are made more manageable by cycling them over time, over a set number of files. Screen prints are optional, and are discontinued when flooding with messages, and continued when such surges of data are passed. File logging always continues, and may even, on occasions, have to be done from higher priority threads.


In the days of multi-threaded DOS programs, the use of some library routines was restricted to the main-thread. (They would only tolerate the main-thread stack.) This DLL grew out of workarounds to this problem. When logging data from time-constrained access to peripherals, it has proved useful. Timing accuracy below 10ms in NT, W2K etc. is available by using the multi-media library WinMM.

Using the code

The Word document JPRfuncts.doc describes all the available routines. A minimum-use set of routines is:- initialization, many (TimeStampedPrints and/or Prints), and termination.

// The filing thread runs at the priority of the 
// thread that calls ...InitStd
// Screen shot is for "PGOmailServer","PGO" & 
// files appear in the running directory
        // once only, probably on the main thread
  Jprintf_StampP("dataToBeTimeStamppedAndLogged");// many, any thread
  Jprintf_P("dataToBeLogged");// many, any thread
  Jprintf_Term();// once only, probably on the main thread


  • 3.5 - Note: logging directory to be Default at Init time.
  • 3.4 - Comment/logging maintenance.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Web Developer
United Kingdom United Kingdom
BSc (St.Andrews(1963-67))
Systems Programmer 39+yrs
Married to first wife 35yrs & counting, four grown-up children
Religious opinions similar to MelG's
It is not the gnosis, but the praxis must be the fruit. (Aristotle)

You may also be interested in...

Comments and Discussions

GeneralMight be useful... Pin
Hans Dietrich8-Apr-05 7:02
memberHans Dietrich8-Apr-05 7:02 
GeneralComments Pin
peterchen4-May-04 7:29
memberpeterchen4-May-04 7:29 
GeneralRe: Comments Pin
Lymington4-May-04 21:21
memberLymington4-May-04 21:21 
QuestionQuality? Pin
Peter Ritchie9-Mar-04 7:50
memberPeter Ritchie9-Mar-04 7:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170422.1 | Last Updated 1 Mar 2006
Article Copyright 2004 by Lymington
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid