Logging

Top  Previous  Next

DigiView currently does not provide any type of logging facility for plug-in debug.  However, your plug-in has full access to the PC so it could create log files of its own.  If you want the log to cover the lifetime of the plug-in, you could open a log file in the OnLoad() call and ensure it is closed in the OnUnload() routine.  If you want it to log a single capture parse, you could open/close it in the StartOfData() and EndOfData() routines.  Keep in mind that any logging from within the parser routine could generate a lot of data and could have an impact on DigiView's performance.  A low-impact form of logging is to store significant events in memory and then dump them to a file on EndOfData(). For example, you might store the last dozen events and fields in memory.  When parsing is complete (or fails), you could dump them, along with some of your current state (bit-number, field count...) to disk.