Fixed warning when building stub_mm plugin.
1 <!-- vi: set ts=4 sw=4 : -->
2 <!-- vim: set tw=75 : -->
6 <title>Metamod TraceAPI Plugin</title>
13 <p> This was originally intended as a (more or less) complete example of a
14 Metamod plugin. It catches <b><i>every</i></b> call available to it (dll
15 routines both before and after the game, as well as engine functions both
16 before and after the engine).
18 <p> Because it catches every routine, I figured I'd give it the ability to
19 log when given routines are called, so it became an "api tracing" plugin.
22 <p> This can actually be useful for tracking the operation of the HL
23 engine, as well as that of a particular HL game mod.
25 <p> It recognizes the following server cvars:
28 // Tracing debug levels; higher values log increasingly frequent routines.
29 // Currently 0-50. See "api_info.cpp" for the debug levels of various
32 // Trace level for dllapi routines.
35 // Trace level for "new" dllapi routines.
38 // Trace level for engine functions.
41 // Enable unlimited trace logging. By default (as of v1.06), it only
42 // logs _one_ trace message per second, to keep from overwhelming the
43 // server. Set to "1" to enable unlimited logging. (Default "0")
46 // General debug level, independent of trace levels. Not currently used.
51 <p> and the following server commands:
54 // Enable tracing of a given routine, independent of "trace_*" level.
55 // See the list of routine names in "api_info.cpp". Case is insignificant.
56 trace set <APIroutine>
58 // Disable tracing of a given routine, iff previously enabled with "trace".
59 // Doesn't affect routines being logged via "trace_*" level.
60 trace unset <APIroutine>
62 // Show the routines being traced.
65 // List the various routines that can be traced.
71 // Prints out version/date/etc.
75 <p> Note the information it logs on each routine invocation is, at the
76 moment, relatively minimal. I included information that seemed obvious
77 (args for a <tt>ClientCommand</tt>, etc), and I've added info for other
78 routines as I've come across a need. Most routines I still know too little
79 about to log any particular information (<tt>CreateBaseline</tt>, etc).
80 Feel free to add information that you're interested in to the log messages
81 in the routines; the examples should be pretty self-explanatory. I'd be
82 interested in knowing as well, for adding it to the distribution code.