Article Preview
Buy Now
| Print: | |
| PDF: |
Review
LogIt
Issue: 1.6 (June/July 2003)
Author: Brian Jones
Article Description: No description available.
Article Length (in bytes): 3,814
Starting Page Number: 8
RBD Number: 1603
Resource File(s): None
Related Web Link(s):
http://myweb.cableone.net/schasj/
http://myweb.cableone.net/schasj/Macintosh.htm
http://myweb.cableone.net/schasj/LogIt%20Page.htm
Known Limitations: None
Full text of article...
Keeping a log of your program's progress can be a key element in debugging a piece of code or in tracking the effects of program changes on program performance. There are simple ways to implement very basic logging in REALbasic, but LogIt provides a small, stable, relatively advanced solution that will fulfill the needs of almost any developer on almost any project.
LogIt is installed by including a module and a window in your project and setting some global variables at startup. If the user chooses to log to the window rather than to a file, a discreet floating window is shown with all log entries. The developer appends entries with their timestamp automatically included by simply passing a user-defined string to a function called WriteLog. The logging process can be customized by setting four globals.
The first global, LoggingFormat, allows users to select whether they want to timestamp according to the time of day, in units of ticks or microseconds, or not at all. Setting LogRelativeTo allows the user to specify the time since the log opened, since the last log entry was made, or since system startup. The LogIt window will show if LoggingToWindow is set to true, otherwise the log will be saved to a file on the Desktop. Finally, setting LogImmediately allows the user to decide between the security of saving the log with each entry or the speed increase of keeping it in a cache at the risk of losing the log data if there is a problem.
Because LogIt allows a string to be passed to its logging engine, the content saved to the log is entirely up to the developer. The contents of variables can be monitored, the name of the function from which the log entry is made can be displayed, or any other descriptive text can be entered. The level of customization allowed strikes a perfect balance between a level of flexibility appropriate for almost any application and the ease of use that makes it perfect for those needing only a simple solution.
LogIt supports both Mac platforms. The demo project comes in REALbasic 2 format and was tested in REALbasic 5, so presumably all intermediate versions are supported as well. The author notes that despite very limited testing, the demo project appears to run without problems in Windows as well. There is only a slight discrepancy when it comes to logging to a file. The file is saved to the Desktop as it should be in Windows XP, but in previous versions is saved to a different location.
LogIt is easy to install, can fulfill the needs of almost any project, and can be used with virtually any combination of development environment and target platform available in REALbasic. LogIt should be an automatic choice for anyone desiring to add standard logging functionality to their debugging process.
In Brief Product LogIt Author Steven J. Schaeffer Price Free System Requirements N/A Contact Info http://myweb.cableone.net/schasj/
http://myweb.cableone.net/schasj/Macintosh.htm
http://myweb.cableone.net/schasj/LogIt%20Page.htm
Pros Stable, Flexible, Full-Featured, Free Cons None Rating (1.0-5.0): 5.0
End of article.
Article copyrighted by REALbasic Developer magazine. All rights reserved.
|








