Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 550bbe86d83a7870fdddc73c68e5d2b2 > files > 196

libunbound-devel-1.3.4-1mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>unbound: util/log.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.9 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="dir_4b581c88b01efb1cf178857b56f0f2fb.html">util</a>
  </div>
</div>
<div class="contents">
<h1>log.h File Reference</h1>This file contains logging functions.  
<a href="#_details">More...</a>
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="aa54d36c55dc459fd6d0646606aa0596"></a><!-- doxytag: member="log.h::log_assert" ref="aa54d36c55dc459fd6d0646606aa0596" args="(x)" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="log_8h.html#aa54d36c55dc459fd6d0646606aa0596">log_assert</a>(x)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">an assertion that is thrown to the logfile. <br></td></tr>
<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="log_8h.html#a6e4bbdddab8be2b3694da9631d23979">verbosity_value</a> { <br>
&nbsp;&nbsp;<a class="el" href="log_8h.html#a6e4bbdddab8be2b3694da9631d2397957b43d1a771d6b712002295efa7fb063">NO_VERBOSE</a> =  0, 
<a class="el" href="log_8h.html#a6e4bbdddab8be2b3694da9631d2397940fad9183965de577a3dd1f5f4e50477">VERB_OPS</a>, 
<a class="el" href="log_8h.html#a6e4bbdddab8be2b3694da9631d23979144e225bef5306aab7d1e6da76b4ddbb">VERB_DETAIL</a>, 
<a class="el" href="log_8h.html#a6e4bbdddab8be2b3694da9631d2397911c2d0c123c98deaa57ff70b7b5d495f">VERB_QUERY</a>, 
<br>
&nbsp;&nbsp;<a class="el" href="log_8h.html#a6e4bbdddab8be2b3694da9631d23979e7ae7bf6eafaa599a8bba9a4d368757d">VERB_ALGO</a>, 
<a class="el" href="log_8h.html#a6e4bbdddab8be2b3694da9631d239795ad1997b3f0ae5a5e8039f0de5014fec">VERB_CLIENT</a>
<br>
 }</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">verbosity value:  <a href="log_8h.html#a6e4bbdddab8be2b3694da9631d23979">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="log_8h.html#fa51ec324552e0be2abc211e820849bb">verbose</a> (enum <a class="el" href="log_8h.html#a6e4bbdddab8be2b3694da9631d23979">verbosity_value</a> level, const char *format,...) ATTR_FORMAT(printf</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">log a verbose message, pass the level for this message.  <a href="#fa51ec324552e0be2abc211e820849bb"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="log_8h.html#82d5a9283efbd84bb3021859d304c002">log_init</a> (const char *filename, int use_syslog, const char *chrootdir)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">call this to initialize logging services.  <a href="#82d5a9283efbd84bb3021859d304c002"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="log_8h.html#e3b0abea3006c8287a9abe4fe856a286">log_file</a> (FILE *f)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set logging to go to the specified file *.  <a href="#e3b0abea3006c8287a9abe4fe856a286"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="log_8h.html#2db5d733adba66bad8830569b6feac77">log_thread_set</a> (int *num)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Init a thread (will print this number for the thread log entries).  <a href="#2db5d733adba66bad8830569b6feac77"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="log_8h.html#817257d91fd22feec362ba59f2a1217a">log_ident_set</a> (const char *id)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set identity to print, default is 'unbound'.  <a href="#817257d91fd22feec362ba59f2a1217a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="log_8h.html#62e44241ca6a18a816da710b77149546">log_set_time</a> (uint32_t *t)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the time value to print in log entries.  <a href="#62e44241ca6a18a816da710b77149546"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="log_8h.html#913ae4ba85ddc8a8ac3434e82155982d">log_set_time_asc</a> (int use_asc)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set if the time value is printed ascii or decimal in log entries.  <a href="#913ae4ba85ddc8a8ac3434e82155982d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="log_8h.html#650315e042c88324dce7f71246e1b551">log_info</a> (const char *format,...) ATTR_FORMAT(printf</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Log informational message.  <a href="#650315e042c88324dce7f71246e1b551"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="log_8h.html#01a847c840c0ae5c3b76d46b5b1758ed">log_err</a> (const char *format,...) ATTR_FORMAT(printf</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Log error message.  <a href="#01a847c840c0ae5c3b76d46b5b1758ed"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void void void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="log_8h.html#5495b5da28a2a6bd8260d3b00b6c86f5">log_warn</a> (const char *format,...) ATTR_FORMAT(printf</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Log warning message.  <a href="#5495b5da28a2a6bd8260d3b00b6c86f5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void void void void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="log_8h.html#3ea534cadc408a1c8d5bd90fc164c18e">log_hex</a> (const char *msg, void *data, size_t length)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Log a hex-string to the log.  <a href="#3ea534cadc408a1c8d5bd90fc164c18e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="log_8h.html#7210eedf8fb84d25a03df0502040e1f8">log_buf</a> (enum <a class="el" href="log_8h.html#a6e4bbdddab8be2b3694da9631d23979">verbosity_value</a> level, const char *msg, ldns_buffer *buf)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Easy alternative for log_hex, takes a ldns_buffer.  <a href="#7210eedf8fb84d25a03df0502040e1f8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="log_8h.html#94bebb0c2e279367864230a14562d747">fatal_exit</a> (const char *format,...) ATTR_FORMAT(printf</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Log fatal error message, and exit the current process.  <a href="#94bebb0c2e279367864230a14562d747"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="log_8h.html#ce49d73c360e0e260f153a9d952b233c">log_vmsg</a> (int pri, const char *type, const char *format, va_list args)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">va_list argument version of log_info.  <a href="#ce49d73c360e0e260f153a9d952b233c"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2606653172a719e3798320e11195d991"></a><!-- doxytag: member="log.h::verbosity" ref="2606653172a719e3798320e11195d991" args="" -->
enum <a class="el" href="log_8h.html#a6e4bbdddab8be2b3694da9631d23979">verbosity_value</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="log_8h.html#2606653172a719e3798320e11195d991">verbosity</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The global verbosity setting. <br></td></tr>
</table>
<hr><h2>Detailed Description</h2>
This file contains logging functions. 
<p>
<hr><h2>Enumeration Type Documentation</h2>
<a class="anchor" name="a6e4bbdddab8be2b3694da9631d23979"></a><!-- doxytag: member="log.h::verbosity_value" ref="a6e4bbdddab8be2b3694da9631d23979" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="log_8h.html#a6e4bbdddab8be2b3694da9631d23979">verbosity_value</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
verbosity value: 
<p>
<dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="a6e4bbdddab8be2b3694da9631d2397957b43d1a771d6b712002295efa7fb063"></a><!-- doxytag: member="NO_VERBOSE" ref="a6e4bbdddab8be2b3694da9631d2397957b43d1a771d6b712002295efa7fb063" args="" -->NO_VERBOSE</em>&nbsp;</td><td>
0 - no verbose messages </td></tr>
<tr><td valign="top"><em><a class="anchor" name="a6e4bbdddab8be2b3694da9631d2397940fad9183965de577a3dd1f5f4e50477"></a><!-- doxytag: member="VERB_OPS" ref="a6e4bbdddab8be2b3694da9631d2397940fad9183965de577a3dd1f5f4e50477" args="" -->VERB_OPS</em>&nbsp;</td><td>
1 - operational information </td></tr>
<tr><td valign="top"><em><a class="anchor" name="a6e4bbdddab8be2b3694da9631d23979144e225bef5306aab7d1e6da76b4ddbb"></a><!-- doxytag: member="VERB_DETAIL" ref="a6e4bbdddab8be2b3694da9631d23979144e225bef5306aab7d1e6da76b4ddbb" args="" -->VERB_DETAIL</em>&nbsp;</td><td>
2 - detailed information </td></tr>
<tr><td valign="top"><em><a class="anchor" name="a6e4bbdddab8be2b3694da9631d2397911c2d0c123c98deaa57ff70b7b5d495f"></a><!-- doxytag: member="VERB_QUERY" ref="a6e4bbdddab8be2b3694da9631d2397911c2d0c123c98deaa57ff70b7b5d495f" args="" -->VERB_QUERY</em>&nbsp;</td><td>
3 - query level information </td></tr>
<tr><td valign="top"><em><a class="anchor" name="a6e4bbdddab8be2b3694da9631d23979e7ae7bf6eafaa599a8bba9a4d368757d"></a><!-- doxytag: member="VERB_ALGO" ref="a6e4bbdddab8be2b3694da9631d23979e7ae7bf6eafaa599a8bba9a4d368757d" args="" -->VERB_ALGO</em>&nbsp;</td><td>
4 - algorithm level information </td></tr>
<tr><td valign="top"><em><a class="anchor" name="a6e4bbdddab8be2b3694da9631d239795ad1997b3f0ae5a5e8039f0de5014fec"></a><!-- doxytag: member="VERB_CLIENT" ref="a6e4bbdddab8be2b3694da9631d239795ad1997b3f0ae5a5e8039f0de5014fec" args="" -->VERB_CLIENT</em>&nbsp;</td><td>
5 - querier client information </td></tr>
</table>
</dl>

</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="fa51ec324552e0be2abc211e820849bb"></a><!-- doxytag: member="log.h::verbose" ref="fa51ec324552e0be2abc211e820849bb" args="(enum verbosity_value level, const char *format,...) ATTR_FORMAT(printf" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void verbose           </td>
          <td>(</td>
          <td class="paramtype">enum <a class="el" href="log_8h.html#a6e4bbdddab8be2b3694da9631d23979">verbosity_value</a>&nbsp;</td>
          <td class="paramname"> <em>level</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&nbsp;</td>
          <td class="paramname"> <em>...</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
log a verbose message, pass the level for this message. 
<p>
It has printf formatted arguments. No trailing newline is needed. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>level,:</em>&nbsp;</td><td>verbosity level for this message, compared to global verbosity setting. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>format,:</em>&nbsp;</td><td>printf-style format string. Arguments follow. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="82d5a9283efbd84bb3021859d304c002"></a><!-- doxytag: member="log.h::log_init" ref="82d5a9283efbd84bb3021859d304c002" args="(const char *filename, int use_syslog, const char *chrootdir)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void void log_init           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>use_syslog</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>chrootdir</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
call this to initialize logging services. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>filename,:</em>&nbsp;</td><td>if NULL stderr is used. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>use_syslog,:</em>&nbsp;</td><td>set to true to ignore filename and use syslog(3). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>chrootdir,:</em>&nbsp;</td><td>to which directory we have been chrooted, if any. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="log_8c_source.html#l00070">ident</a>, <a class="el" href="log_8c_source.html#l00066">key_created</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, <a class="el" href="log_8c_source.html#l00064">logfile</a>, <a class="el" href="log_8c_source.html#l00073">logging_to_syslog</a>, <a class="el" href="log_8c_source.html#l00068">logkey</a>, <a class="el" href="log_8h_source.html#l00056">VERB_QUERY</a>, and <a class="el" href="ldns-testpkts_8c.html#a557e5b23b2833d7c1ec0415a1bdd2b1">verbose()</a>.</p>

<p>Referenced by <a class="el" href="context_8c_source.html#l00054">context_finalize()</a>, <a class="el" href="unbound_8c_source.html#l00595">main()</a>, <a class="el" href="unbound_8c_source.html#l00338">perform_setup()</a>, <a class="el" href="unbound_8c_source.html#l00525">run_daemon()</a>, <a class="el" href="win__svc_8c_source.html#l00243">service_init()</a>, <a class="el" href="win__svc_8c_source.html#l00397">service_start()</a>, and <a class="el" href="libunbound_8c_source.html#l00064">ub_ctx_create()</a>.</p>

</div>
</div><p>
<a class="anchor" name="e3b0abea3006c8287a9abe4fe856a286"></a><!-- doxytag: member="log.h::log_file" ref="e3b0abea3006c8287a9abe4fe856a286" args="(FILE *f)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void log_file           </td>
          <td>(</td>
          <td class="paramtype">FILE *&nbsp;</td>
          <td class="paramname"> <em>f</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set logging to go to the specified file *. 
<p>
This setting does not affect the use_syslog setting. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>f,:</em>&nbsp;</td><td>to that file, or pass NULL to disable logging. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="log_8c_source.html#l00064">logfile</a>.</p>

<p>Referenced by <a class="el" href="context_8c_source.html#l00054">context_finalize()</a>, and <a class="el" href="libunbound_8c_source.html#l00324">ub_ctx_debugout()</a>.</p>

</div>
</div><p>
<a class="anchor" name="2db5d733adba66bad8830569b6feac77"></a><!-- doxytag: member="log.h::log_thread_set" ref="2db5d733adba66bad8830569b6feac77" args="(int *num)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void log_thread_set           </td>
          <td>(</td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>num</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Init a thread (will print this number for the thread log entries). 
<p>
Must be called from the thread itself. If not called 0 is printed. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>num,:</em>&nbsp;</td><td>number to print for this thread. Owned by caller, must continue to exist. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="log_8c_source.html#l00068">logkey</a>.</p>

<p>Referenced by <a class="el" href="daemon_8c_source.html#l00448">daemon_cleanup()</a>, <a class="el" href="asynclook_8c_source.html#l00276">ext_thread()</a>, <a class="el" href="libworker_8c_source.html#l00257">libworker_dobg()</a>, <a class="el" href="unitlruhash_8c_source.html#l00432">test_thr_main()</a>, <a class="el" href="daemon_8c_source.html#l00334">thread_start()</a>, and <a class="el" href="win__svc_8c_source.html#l00465">win_do_cron()</a>.</p>

</div>
</div><p>
<a class="anchor" name="817257d91fd22feec362ba59f2a1217a"></a><!-- doxytag: member="log.h::log_ident_set" ref="817257d91fd22feec362ba59f2a1217a" args="(const char *id)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void log_ident_set           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>id</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set identity to print, default is 'unbound'. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>id,:</em>&nbsp;</td><td>string to print. Name of executable. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="log_8c_source.html#l00070">ident</a>.</p>

<p>Referenced by <a class="el" href="unbound-checkconf_8c_source.html#l00576">main()</a>, and <a class="el" href="libunbound_8c_source.html#l00064">ub_ctx_create()</a>.</p>

</div>
</div><p>
<a class="anchor" name="62e44241ca6a18a816da710b77149546"></a><!-- doxytag: member="log.h::log_set_time" ref="62e44241ca6a18a816da710b77149546" args="(uint32_t *t)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void log_set_time           </td>
          <td>(</td>
          <td class="paramtype">uint32_t *&nbsp;</td>
          <td class="paramname"> <em>t</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the time value to print in log entries. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>t,:</em>&nbsp;</td><td>the point is copied and used to find the time. if NULL, time(2) is used. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="log_8c_source.html#l00076">log_now</a>.</p>

<p>Referenced by <a class="el" href="worker_8c_source.html#l01115">worker_delete()</a>, and <a class="el" href="worker_8c_source.html#l00967">worker_init()</a>.</p>

</div>
</div><p>
<a class="anchor" name="913ae4ba85ddc8a8ac3434e82155982d"></a><!-- doxytag: member="log.h::log_set_time_asc" ref="913ae4ba85ddc8a8ac3434e82155982d" args="(int use_asc)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void log_set_time_asc           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>use_asc</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set if the time value is printed ascii or decimal in log entries. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>use_asc,:</em>&nbsp;</td><td>if true, ascii is printed, otherwise decimal. If the conversion fails or you have no time functions, decimal is printed. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="log_8c_source.html#l00078">log_time_asc</a>.</p>

<p>Referenced by <a class="el" href="config__file_8c_source.html#l00822">config_apply()</a>.</p>

</div>
</div><p>
<a class="anchor" name="650315e042c88324dce7f71246e1b551"></a><!-- doxytag: member="log.h::log_info" ref="650315e042c88324dce7f71246e1b551" args="(const char *format,...) ATTR_FORMAT(printf" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void log_info           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&nbsp;</td>
          <td class="paramname"> <em>...</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Log informational message. 
<p>
Pass printf formatted arguments. No trailing newline is needed. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>format,:</em>&nbsp;</td><td>printf-style format string. Arguments follow. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="01a847c840c0ae5c3b76d46b5b1758ed"></a><!-- doxytag: member="log.h::log_err" ref="01a847c840c0ae5c3b76d46b5b1758ed" args="(const char *format,...) ATTR_FORMAT(printf" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void void log_err           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&nbsp;</td>
          <td class="paramname"> <em>...</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Log error message. 
<p>
Pass printf formatted arguments. No trailing newline is needed. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>format,:</em>&nbsp;</td><td>printf-style format string. Arguments follow. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="5495b5da28a2a6bd8260d3b00b6c86f5"></a><!-- doxytag: member="log.h::log_warn" ref="5495b5da28a2a6bd8260d3b00b6c86f5" args="(const char *format,...) ATTR_FORMAT(printf" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void void void log_warn           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&nbsp;</td>
          <td class="paramname"> <em>...</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Log warning message. 
<p>
Pass printf formatted arguments. No trailing newline is needed. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>format,:</em>&nbsp;</td><td>printf-style format string. Arguments follow. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="3ea534cadc408a1c8d5bd90fc164c18e"></a><!-- doxytag: member="log.h::log_hex" ref="3ea534cadc408a1c8d5bd90fc164c18e" args="(const char *msg, void *data, size_t length)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void void void void log_hex           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>msg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>length</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Log a hex-string to the log. 
<p>
Can be any length. performs mallocs to do so, slow. But debug useful. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>msg,:</em>&nbsp;</td><td>string desc to accompany the hexdump. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data,:</em>&nbsp;</td><td>data to dump in hex format. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length,:</em>&nbsp;</td><td>length of data. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="log_8c_source.html#l00298">log_hex_f()</a>, and <a class="el" href="log_8c_source.html#l00062">verbosity</a>.</p>

<p>Referenced by <a class="el" href="unitmsgparse_8c_source.html#l00169">test_buffers()</a>.</p>

</div>
</div><p>
<a class="anchor" name="7210eedf8fb84d25a03df0502040e1f8"></a><!-- doxytag: member="log.h::log_buf" ref="7210eedf8fb84d25a03df0502040e1f8" args="(enum verbosity_value level, const char *msg, ldns_buffer *buf)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void log_buf           </td>
          <td>(</td>
          <td class="paramtype">enum <a class="el" href="log_8h.html#a6e4bbdddab8be2b3694da9631d23979">verbosity_value</a>&nbsp;</td>
          <td class="paramname"> <em>level</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>msg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ldns_buffer *&nbsp;</td>
          <td class="paramname"> <em>buf</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Easy alternative for log_hex, takes a ldns_buffer. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>level,:</em>&nbsp;</td><td>verbosity level for this message, compared to global verbosity setting. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>msg,:</em>&nbsp;</td><td>string desc to print </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>buf,:</em>&nbsp;</td><td>the buffer. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="log_8c_source.html#l00298">log_hex_f()</a>, and <a class="el" href="log_8c_source.html#l00062">verbosity</a>.</p>

<p>Referenced by <a class="el" href="outside__network_8c_source.html#l00303">outnet_udp_cb()</a>, <a class="el" href="streamtcp_8c_source.html#l00155">recv_one()</a>, <a class="el" href="outside__network_8c_source.html#l01308">serviced_callbacks()</a>, <a class="el" href="unitmsgparse_8c_source.html#l00169">test_buffers()</a>, and <a class="el" href="worker_8c_source.html#l00681">worker_handle_request()</a>.</p>

</div>
</div><p>
<a class="anchor" name="94bebb0c2e279367864230a14562d747"></a><!-- doxytag: member="log.h::fatal_exit" ref="94bebb0c2e279367864230a14562d747" args="(const char *format,...) ATTR_FORMAT(printf" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fatal_exit           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&nbsp;</td>
          <td class="paramname"> <em>...</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Log fatal error message, and exit the current process. 
<p>
Pass printf formatted arguments. No trailing newline is needed. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>format,:</em>&nbsp;</td><td>printf-style format string. Arguments follow. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="ce49d73c360e0e260f153a9d952b233c"></a><!-- doxytag: member="log.h::log_vmsg" ref="ce49d73c360e0e260f153a9d952b233c" args="(int pri, const char *type, const char *format, va_list args)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void void log_vmsg           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>pri</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">va_list&nbsp;</td>
          <td class="paramname"> <em>args</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
va_list argument version of log_info. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pri,:</em>&nbsp;</td><td>priority type, for example 5 (INFO). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>type,:</em>&nbsp;</td><td>string to designate type of message (info, error). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>format,:</em>&nbsp;</td><td>the printf style format to print. no newline. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>args,:</em>&nbsp;</td><td>arguments for format string. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="log_8c_source.html#l00070">ident</a>, <a class="el" href="log_8c_source.html#l00076">log_now</a>, <a class="el" href="log_8c_source.html#l00078">log_time_asc</a>, <a class="el" href="log_8c_source.html#l00064">logfile</a>, <a class="el" href="log_8c_source.html#l00073">logging_to_syslog</a>, <a class="el" href="log_8c_source.html#l00068">logkey</a>, <a class="el" href="win__svc_8h_source.html#l00061">MSG_GENERIC_ERR</a>, <a class="el" href="win__svc_8h_source.html#l00057">MSG_GENERIC_INFO</a>, <a class="el" href="win__svc_8h_source.html#l00055">MSG_GENERIC_SUCCESS</a>, <a class="el" href="win__svc_8h_source.html#l00059">MSG_GENERIC_WARN</a>, and <a class="el" href="win__svc_8h_source.html#l00052">SERVICE_NAME</a>.</p>

<p>Referenced by <a class="el" href="log_8c_source.html#l00267">fatal_exit()</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, <a class="el" href="log_8c_source.html#l00228">log_info()</a>, <a class="el" href="log_8c_source.html#l00254">log_warn()</a>, and <a class="el" href="log_8c_source.html#l00282">verbose()</a>.</p>

</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Tue Oct 13 06:46:32 2009 for unbound by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
</body>
</html>