diff options
Diffstat (limited to 'docs/htmldocs/Samba3-Developers-Guide/debug.html')
-rw-r--r-- | docs/htmldocs/Samba3-Developers-Guide/debug.html | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/htmldocs/Samba3-Developers-Guide/debug.html b/docs/htmldocs/Samba3-Developers-Guide/debug.html index f56fe13b6c..6dbe88ec37 100644 --- a/docs/htmldocs/Samba3-Developers-Guide/debug.html +++ b/docs/htmldocs/Samba3-Developers-Guide/debug.html @@ -1,4 +1,4 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 4. The samba DEBUG system</title><link rel="stylesheet" href="samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.72.0"><link rel="start" href="index.html" title="SAMBA Developers Guide"><link rel="up" href="pt02.html" title="Part II. Samba Basics"><link rel="prev" href="architecture.html" title="Chapter 3. Samba Architecture"><link rel="next" href="internals.html" title="Chapter 5. Samba Internals"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 4. The samba DEBUG system</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="architecture.html">Prev</a> </td><th width="60%" align="center">Part II. Samba Basics</th><td width="20%" align="right"> <a accesskey="n" href="internals.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="debug"></a>Chapter 4. The samba DEBUG system</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Chris</span> <span class="surname">Hertel</span></h3></div></div><div><p class="pubdate">July 1998</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="debug.html#id330279">New Output Syntax</a></span></dt><dt><span class="sect1"><a href="debug.html#id330374">The DEBUG() Macro</a></span></dt><dt><span class="sect1"><a href="debug.html#id330466">The DEBUGADD() Macro</a></span></dt><dt><span class="sect1"><a href="debug.html#id330498">The DEBUGLVL() Macro</a></span></dt><dt><span class="sect1"><a href="debug.html#id330576">New Functions</a></span></dt><dd><dl><dt><span class="sect2"><a href="debug.html#id330582">dbgtext()</a></span></dt><dt><span class="sect2"><a href="debug.html#id330595">dbghdr()</a></span></dt><dt><span class="sect2"><a href="debug.html#id330612">format_debug_text()</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id330279"></a>New Output Syntax</h2></div></div></div><p> +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 4. The samba DEBUG system</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.1"><link rel="start" href="index.html" title="SAMBA Developers Guide"><link rel="up" href="pt02.html" title="Part II. Samba Basics"><link rel="prev" href="architecture.html" title="Chapter 3. Samba Architecture"><link rel="next" href="internals.html" title="Chapter 5. Samba Internals"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 4. The samba DEBUG system</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="architecture.html">Prev</a> </td><th width="60%" align="center">Part II. Samba Basics</th><td width="20%" align="right"> <a accesskey="n" href="internals.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="debug"></a>Chapter 4. The samba DEBUG system</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Chris</span> <span class="surname">Hertel</span></h3></div></div><div><p class="pubdate">July 1998</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="debug.html#id2578353">New Output Syntax</a></span></dt><dt><span class="sect1"><a href="debug.html#id2578465">The DEBUG() Macro</a></span></dt><dt><span class="sect1"><a href="debug.html#id2578574">The DEBUGADD() Macro</a></span></dt><dt><span class="sect1"><a href="debug.html#id2578611">The DEBUGLVL() Macro</a></span></dt><dt><span class="sect1"><a href="debug.html#id2578704">New Functions</a></span></dt><dd><dl><dt><span class="sect2"><a href="debug.html#id2578710">dbgtext()</a></span></dt><dt><span class="sect2"><a href="debug.html#id2578726">dbghdr()</a></span></dt><dt><span class="sect2"><a href="debug.html#id2578745">format_debug_text()</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2578353"></a>New Output Syntax</h2></div></div></div><p> The syntax of a debugging log file is represented as: </p><pre class="programlisting"> >debugfile< :== { >debugmsg< } @@ -51,7 +51,7 @@ by a newline. Note that in the above example the function names are not listed on the header line. That's because the example above was generated on an SGI Indy, and the SGI compiler doesn't support the __FUNCTION__ macro. -</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id330374"></a>The DEBUG() Macro</h2></div></div></div><p> +</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2578465"></a>The DEBUG() Macro</h2></div></div></div><p> Use of the DEBUG() macro is unchanged. DEBUG() takes two parameters. The first is the message level, the second is the body of a function call to the Debug1() function. @@ -102,7 +102,7 @@ would look like this: [1998/07/30 16:00:51, 0] file.c:function(261) . </pre><p>Which isn't much use. The format buffer kludge fixes this problem. -</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id330466"></a>The DEBUGADD() Macro</h2></div></div></div><p> +</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2578574"></a>The DEBUGADD() Macro</h2></div></div></div><p> In addition to the kludgey solution to the broken line problem described above, there is a clean solution. The DEBUGADD() macro never generates a header. It will append new text to the current debug @@ -116,7 +116,7 @@ DEBUGADD() macro is the same as that of the DEBUG() macro. This is the first line. This is the second line. This is the third line. -</pre></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id330498"></a>The DEBUGLVL() Macro</h2></div></div></div><p> +</pre></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2578611"></a>The DEBUGLVL() Macro</h2></div></div></div><p> One of the problems with the DEBUG() macro was that DEBUG() lines tended to get a bit long. Consider this example from nmbd_sendannounce.c: @@ -151,7 +151,7 @@ within the DEBUGLVL() block. </p></li><li><p> Processing that is only relevant to debug output can be contained within the DEBUGLVL() block. -</p></li></ol></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id330576"></a>New Functions</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id330582"></a>dbgtext()</h3></div></div></div><p> +</p></li></ol></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2578704"></a>New Functions</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2578710"></a>dbgtext()</h3></div></div></div><p> This function prints debug message text to the debug file (and possibly to syslog) via the format buffer. The function uses a variable argument list just like printf() or Debug1(). The @@ -160,7 +160,7 @@ and then passed to format_debug_text(). If you use DEBUGLVL() you will probably print the body of the message using dbgtext(). -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id330595"></a>dbghdr()</h3></div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2578726"></a>dbghdr()</h3></div></div></div><p> This is the function that writes a debug message header. Headers are not processed via the format buffer. Also note that if the format buffer is not empty, a call to dbghdr() will not @@ -168,7 +168,7 @@ produce any output. See the comments in dbghdr() for more info. </p><p> It is not likely that this function will be called directly. It is used by DEBUG() and DEBUGADD(). -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id330612"></a>format_debug_text()</h3></div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2578745"></a>format_debug_text()</h3></div></div></div><p> This is a static function in debug.c. It stores the output text for the body of the message in a buffer until it encounters a newline. When the newline character is found, the buffer is |