Lines Matching +full:- +full:- +full:enable +full:- +full:debug
11 <br> $Id: debug.html,v 1.9 2002-02-02 16:50:56 ca Exp $
16 The debug and trace package provides abstractions for writing trace
17 messages, and abstractions for enabling and disabling debug and
21 Sendmail 8.11 and earlier has a <tt>-d</tt> option which
22 lets you turn on debug and trace code.
23 Debug categories are integers from 0 to 99, with the sole exception
24 of "ANSI", which is a named debug category.
27 The libsm debug package supports named debug categories.
28 Debug category names have the form of C identifiers.
35 In sendmail 8.12, the <tt>-d</tt> flag is generalized
39 "-dANSI" is implemented using a libsm named debug category.
40 You will be able to set a collection of named debug categories to
45 <tt> -dANSI </tt>
49 <tt> -dfoo_*.3 </tt>
53 <tt> -d0-99.1 </tt>
57 <tt> -dANSI,foo_*.3,0-99.1 </tt>
65 #include <sm/debug.h>
75 ** abstractions for setting and testing debug activation levels
81 SM_DEBUG_T dbg = SM_DEBUG_INITIALIZER("name", "@(#)$Debug: name - description $");
83 bool sm_debug_active(SM_DEBUG_T *debug, int level)
84 int sm_debug_level(SM_DEBUG_T *debug)
85 bool sm_debug_unknown(SM_DEBUG_T *debug)
90 All debug categories defined by libsm have names of the form <tt>sm_*</tt>.
91 Debug categories that turn on trace output have names of the form
93 Debug categories that turn on run time checks have names of the form
95 Here are all of the libsm debug categories as of March 2000:
106 <td>enable expensive SM_ASSERT checking</td>
111 <td>enable expensive SM_REQUIRE checking</td>
116 <td>enable expensive SM_ENSURE checking</td>
126 <td>enable checking and memory leak detection in sm_{malloc,realloc,free}</td>
136 To create a new debug category, use the SM_DEBUG_INITIALIZER macro
140 "@(#)$Debug: ANSI - enable reverse video in debug output $");
143 be edited in order to add a new debug category.
145 is to provide an easy way to find out what named debug categories
148 ident /usr/sbin/sendmail | grep Debug
152 what /usr/sbin/sendmail | grep Debug
159 All debug categories default to activation level 0, which means
161 This function updates an internal database of debug settings,
171 This function is used to process the <tt>-d</tt> command line
173 setting of named debug categories. The settings argument is a
174 comma-separated list of settings; each setting is a glob pattern,
180 <tt> bool sm_debug_active(SM_DEBUG_T *debug, int level) </tt>
183 the statically initialized debug structure <tt>debug</tt>
189 This macro performs a function call only if the debug structure has
190 an unknown activation level. All debug structures are in this state
197 <tt> int sm_debug_level(SM_DEBUG_T *debug) </tt>
199 This macro returns the activation level of the specified debug structure.
202 sm_debug_level(debug) >= level
207 sm_debug_active(debug, level)
213 <tt> bool sm_debug_unknown(SM_DEBUG_T *debug) </tt>
216 debug structure is unknown.
224 ... in order to enable the "foo" debugging mechanism
235 A debug structure is in the "unknown" state at the beginning of
245 This function is used to print a debug message.
256 Flush the debug output stream.
262 This function lets you specify where debug output is printed.
263 By default, debug output is written to standard output.
265 We want to allow you to direct debug output to syslog.