Debugging Tools for Windows |
One way to activate Logger is to run the stand-alone logger.exe program. This is essentially a very small debugger that can only take a single target. To run it, include the name of the target application on the command line:
When this is activated, it will load the specified application, and insert code into the target application that will jump off to a routine that loads and initializes logexts.dll in the target application process. This is referred to as "injecting Logger into the target application."
The logger.exe utility and the logexts.dll module are the two components of this Logger vehicle. They communicate through a shared section of memory that includes the output file handles, current category mask, and a pointer to the log output buffer.
A window entitled Logger (debugger) will appear. This window will display the progress of Logger.
After the initialization finishes and the initial display is complete, the Change Settings dialog box will appear. This allows you to configure the Logger settings. The various settings are described as follows:
If a category is disabled, the hooks for all APIs in that category will be removed so that there is no longer any performance overhead. COM hooks are not removed because they cannot be re-enabled at will.
Enabling only certain categories can be useful when you are only interested in a particular type of interaction that the program is having with Windows — for example, file operations. This reduces the log file size and also reduces the effect that Logger has on the execution speed of the process.
Since the buffer memory is managed by the target application, the automatic writing of the buffer to the log files on the disk will not occur if there is an access violation or some other non-recoverable error in the target application. In such cases, you should try to activate the target application's window and hit F12 to get this dialog box back, and then press Flush the Buffer. If this is not done, the most recently-logged functions might not appear in the log files.
Once you have chosen the settings, click Go. The dialog box will close and the target application will begin to run.
If you make the target application's window active and press F12, it will break into Logger. This will cause the target application to freeze and the Change Settings dialog box to reappear. You can alter the settings if you wish, and then press Go to continue execution.
You can let the target application run for as long as you wish. If it terminates normally or due to an error, the logging will stop and cannot be restarted.
When you wish to exit, select File | Exit and click Yes. If the target application is still running, it will be terminated.
When you are running Logger through the logger.exe tool, it will create only one output file — an .lgv file. No text file will be written. However, a .txt file of size zero will be written; this could overwrite a text log written by the debugger previously.
The output file will always be placed in LogExts subdirectory of the desktop; this location cannot be changed.
These limitations will not apply if you are running Logger through the debugger and logexts.dll.