source: trunk/doc/Logging.txt@ 5280

Last change on this file since 5280 was 3811, checked in by phaller, 25 years ago

.

File size: 2.0 KB
Line 
1/* $Id: Logging.txt,v 1.1 2000-07-09 22:27:52 phaller Exp $ */
2
3 Odin Logging
4 ~~~~~~~~~~~~
5
61.0 Standard logging feature
7~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8
9The alpha 5 binaries and daily build zipfiles can generate logfiles to show
10what a win32 application is doing. This can be very useful to determine
11why certain applications don't run correctly.
12
13The major disadvantage of loggging is the overhead. Therefor it has been
14disabled by default in the alpha 5 release and daily builds.
15To enable logging set the environment variable WIN32LOG_ENABLED:
16 SET WIN32LOG_ENABLED=1
17
18To disable logging again, you must clear this variable:
19 SET WIN32LOG_ENABLED=
20
21
222.0 Extended logging features (new as of February 16th)
23~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24
25Disabling or enabling logging for all the Odin dlls isn't always useful.
26To make logging more flexible, you can now disable or enable separate
27source files for each dll (NOTE: Only implemented in kernel32, user32 & gdi32
28for now)
29
30Each dll that supports this feature has a file called dbglocal.cpp in it's
31source directory. It contains a listing of all the sources files for that dll
32(DbgFileNames) and an array with boolean values for each of those files.
33To add this feature to a dll, you must do the following:
34 - Write a custom dbglocal.cpp & dbglocal.h.
35 - Every source file must include dbglocal.h with the correct debug constant:
36 #define DBG_LOCALLOG DBG_directory
37 #include "dbglocal.h"
38 - Initterm.cpp must call ParseLogStatus when the dll is loaded
39
40Each dprintf now first checks if logging is enabled for this sourefile before
41calling WriteLog. (NOTE: dbglocal must be included *after* misc.h)
42
43When building a debug version of a dll, logging is enabled for all source files
44by default.
45
462.1 Examples of custom logging
47~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
48
49Disable logging for kernel32, but enable it for profile.cpp & wprocess.cpp
50 set dbg_kernel32=-dll +profile +wprocess
51
52
53Enable logging for kernel32, but disable it for profile.cpp & wprocess.cpp
54 set dbg_kernel32=+dll -profile -wprocess
55
Note: See TracBrowser for help on using the repository browser.