<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>libcddb: cddb_log.h File Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.6 --> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li id="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 List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul></div> <div class="nav"> <a class="el" href="dir_d95480e064f2cd25d4e283edd80a73aa.html">include</a> » <a class="el" href="dir_847afe0584ab2be2f35afc524ae78865.html">cddb</a></div> <h1>cddb_log.h File Reference</h1> <p> <a href="cddb__log_8h-source.html">Go to the source code of this file.</a><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">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="cddb__log_8h.html#dc804b27caa9d7987d65f5b11ad09b46">CDDB_LOG_H</a></td></tr> <tr><td colspan="2"><br><h2>Typedefs</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="cddb__log_8h.html#89950157a9af55e9f71e034775ceaba7">cddb_log_handler_t</a> )(<a class="el" href="cddb__log_8h.html#1067c83af78e9da497ae86c8defd39ae">cddb_log_level_t</a> level, const char *message)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">This type defines the signature of a libcddb log handler. <a href="#89950157a9af55e9f71e034775ceaba7"></a><br></td></tr> <tr><td colspan="2"><br><h2>Enumerations</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="cddb__log_8h.html#1067c83af78e9da497ae86c8defd39ae">cddb_log_level_t</a> { <br> <a class="el" href="cddb__log_8h.html#1067c83af78e9da497ae86c8defd39ae1b32cee5b7f8028de1896dd90f53501d">CDDB_LOG_DEBUG</a> = 1, <a class="el" href="cddb__log_8h.html#1067c83af78e9da497ae86c8defd39ae8ef48284e846c17888f9c0e4afe15fe8">CDDB_LOG_INFO</a>, <a class="el" href="cddb__log_8h.html#1067c83af78e9da497ae86c8defd39aed96cf4f616974fa8f992527c5d76a2f6">CDDB_LOG_WARN</a>, <a class="el" href="cddb__log_8h.html#1067c83af78e9da497ae86c8defd39aef1766ccf0465b3e48a2fd4c0bb6ad52b">CDDB_LOG_ERROR</a>, <br> <a class="el" href="cddb__log_8h.html#1067c83af78e9da497ae86c8defd39ae7546b947be4d4fdd1f142547673ce222">CDDB_LOG_CRITICAL</a>, <a class="el" href="cddb__log_8h.html#1067c83af78e9da497ae86c8defd39aeba7ad5e887af04201eb0c9f3f2bed1d9">CDDB_LOG_NONE</a> = 99 <br> }</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The different log levels supported by libcddb. <a href="cddb__log_8h.html#1067c83af78e9da497ae86c8defd39ae">More...</a><br></td></tr> <tr><td colspan="2"><br><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="cddb__log_8h.html#89950157a9af55e9f71e034775ceaba7">cddb_log_handler_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="cddb__log_8h.html#18a730cfc28bd8ac7bca95d8cfce0c13">cddb_log_set_handler</a> (<a class="el" href="cddb__log_8h.html#89950157a9af55e9f71e034775ceaba7">cddb_log_handler_t</a> new_handler)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set a custom log handler for libcddb. <a href="#18a730cfc28bd8ac7bca95d8cfce0c13"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="cddb__log_8h.html#840bf4742c82ae63cf61b6bb5032ce81">cddb_log_set_level</a> (<a class="el" href="cddb__log_8h.html#1067c83af78e9da497ae86c8defd39ae">cddb_log_level_t</a> level)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the minimum log level. <a href="#840bf4742c82ae63cf61b6bb5032ce81"></a><br></td></tr> </table> <hr><h2>Define Documentation</h2> <a class="anchor" name="dc804b27caa9d7987d65f5b11ad09b46"></a><!-- doxytag: member="cddb_log.h::CDDB_LOG_H" ref="dc804b27caa9d7987d65f5b11ad09b46" args="" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define CDDB_LOG_H </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> </td> </tr> </table> <hr><h2>Typedef Documentation</h2> <a class="anchor" name="89950157a9af55e9f71e034775ceaba7"></a><!-- doxytag: member="cddb_log.h::cddb_log_handler_t" ref="89950157a9af55e9f71e034775ceaba7" args=")(cddb_log_level_t level, const char *message)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">typedef void(* <a class="el" href="cddb__log_8h.html#89950157a9af55e9f71e034775ceaba7">cddb_log_handler_t</a>)(<a class="el" href="cddb__log_8h.html#1067c83af78e9da497ae86c8defd39ae">cddb_log_level_t</a> level, const char *message) </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> This type defines the signature of a libcddb log handler. <p> For every message being logged by libcddb, the handler will receive the log level and the message string.<p> <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="cddb__log_8h.html#18a730cfc28bd8ac7bca95d8cfce0c13">cddb_log_set_handler</a> <p> <a class="el" href="cddb__log_8h.html#1067c83af78e9da497ae86c8defd39ae">cddb_log_level_t</a></dd></dl> <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> </td><td>The log level. </td></tr> <tr><td valign="top"></td><td valign="top"><em>message</em> </td><td>The log message. </td></tr> </table> </dl> </td> </tr> </table> <hr><h2>Enumeration Type Documentation</h2> <a class="anchor" name="1067c83af78e9da497ae86c8defd39ae"></a><!-- doxytag: member="cddb_log.h::cddb_log_level_t" ref="1067c83af78e9da497ae86c8defd39ae" args="" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">enum <a class="el" href="cddb__log_8h.html#1067c83af78e9da497ae86c8defd39ae">cddb_log_level_t</a> </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> The different log levels supported by libcddb. <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="1067c83af78e9da497ae86c8defd39ae1b32cee5b7f8028de1896dd90f53501d"></a><!-- doxytag: member="CDDB_LOG_DEBUG" ref="1067c83af78e9da497ae86c8defd39ae1b32cee5b7f8028de1896dd90f53501d" args="" -->CDDB_LOG_DEBUG</em> </td><td> Debug-level messages. </td></tr> <tr><td valign="top"><em><a class="anchor" name="1067c83af78e9da497ae86c8defd39ae8ef48284e846c17888f9c0e4afe15fe8"></a><!-- doxytag: member="CDDB_LOG_INFO" ref="1067c83af78e9da497ae86c8defd39ae8ef48284e846c17888f9c0e4afe15fe8" args="" -->CDDB_LOG_INFO</em> </td><td> Informational. </td></tr> <tr><td valign="top"><em><a class="anchor" name="1067c83af78e9da497ae86c8defd39aed96cf4f616974fa8f992527c5d76a2f6"></a><!-- doxytag: member="CDDB_LOG_WARN" ref="1067c83af78e9da497ae86c8defd39aed96cf4f616974fa8f992527c5d76a2f6" args="" -->CDDB_LOG_WARN</em> </td><td> Warning conditions. </td></tr> <tr><td valign="top"><em><a class="anchor" name="1067c83af78e9da497ae86c8defd39aef1766ccf0465b3e48a2fd4c0bb6ad52b"></a><!-- doxytag: member="CDDB_LOG_ERROR" ref="1067c83af78e9da497ae86c8defd39aef1766ccf0465b3e48a2fd4c0bb6ad52b" args="" -->CDDB_LOG_ERROR</em> </td><td> Error conditions. </td></tr> <tr><td valign="top"><em><a class="anchor" name="1067c83af78e9da497ae86c8defd39ae7546b947be4d4fdd1f142547673ce222"></a><!-- doxytag: member="CDDB_LOG_CRITICAL" ref="1067c83af78e9da497ae86c8defd39ae7546b947be4d4fdd1f142547673ce222" args="" -->CDDB_LOG_CRITICAL</em> </td><td> Critical conditions. </td></tr> <tr><td valign="top"><em><a class="anchor" name="1067c83af78e9da497ae86c8defd39aeba7ad5e887af04201eb0c9f3f2bed1d9"></a><!-- doxytag: member="CDDB_LOG_NONE" ref="1067c83af78e9da497ae86c8defd39aeba7ad5e887af04201eb0c9f3f2bed1d9" args="" -->CDDB_LOG_NONE</em> </td><td> No log messages. </td></tr> </table> </dl> </td> </tr> </table> <hr><h2>Function Documentation</h2> <a class="anchor" name="18a730cfc28bd8ac7bca95d8cfce0c13"></a><!-- doxytag: member="cddb_log.h::cddb_log_set_handler" ref="18a730cfc28bd8ac7bca95d8cfce0c13" args="(cddb_log_handler_t new_handler)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"><a class="el" href="cddb__log_8h.html#89950157a9af55e9f71e034775ceaba7">cddb_log_handler_t</a> cddb_log_set_handler </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="cddb__log_8h.html#89950157a9af55e9f71e034775ceaba7">cddb_log_handler_t</a> </td> <td class="mdname1" valign="top" nowrap> <em>new_handler</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Set a custom log handler for libcddb. <p> The return value is the log handler being replaced. If the provided parameter is NULL, then the handler will be reset to the default handler.<p> <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="cddb__log_8h.html#89950157a9af55e9f71e034775ceaba7">cddb_log_handler_t</a></dd></dl> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>new_handler</em> </td><td>The new log handler. </td></tr> </table> </dl> <dl compact><dt><b>Returns:</b></dt><dd>The previous log handler. </dd></dl> </td> </tr> </table> <a class="anchor" name="840bf4742c82ae63cf61b6bb5032ce81"></a><!-- doxytag: member="cddb_log.h::cddb_log_set_level" ref="840bf4742c82ae63cf61b6bb5032ce81" args="(cddb_log_level_t level)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void cddb_log_set_level </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="cddb__log_8h.html#1067c83af78e9da497ae86c8defd39ae">cddb_log_level_t</a> </td> <td class="mdname1" valign="top" nowrap> <em>level</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Set the minimum log level. <p> This function is only useful in conjunction with the default log handler. The default log handler will print any log messages that have a log level equal or higher than this minimum log level to stderr. By default the minimum log level is set to CDDB_LOG_WARN. This means that only warning, error and critical messages will be printed. You can silence the default log handler by setting the minimum log level to CDDB_LOG_NONE.<p> <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="cddb__log_8h.html#1067c83af78e9da497ae86c8defd39ae">cddb_log_level_t</a></dd></dl> <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> </td><td>The minimum log level. </td></tr> </table> </dl> </td> </tr> </table> <hr size="1"><address style="align: right;"><small>Generated on Sun Oct 15 14:49:15 2006 for libcddb by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address> </body> </html>