Blob Blame History Raw
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>libkeymap: src/libkeymap/keymap/logging.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">libkeymap
   &#160;<span id="projectnumber">2.0.3</span>
   </div>
   <div id="projectbrief">Library to manage the Linux keymaps</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">src/libkeymap/keymap/logging.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="logging_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00005"></a>00005 <span class="preprocessor">#ifndef LK_LOGGING_H</span>
<a name="l00006"></a>00006 <span class="preprocessor"></span><span class="preprocessor">#define LK_LOGGING_H</span>
<a name="l00007"></a>00007 <span class="preprocessor"></span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &lt;syslog.h&gt;</span>
<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;<a class="code" href="context_8h.html" title="Header contains flags, keywords and context structure.">keymap/context.h</a>&gt;</span>
<a name="l00010"></a>00010 
<a name="l00017"></a>00017 <span class="keywordtype">void</span> <a class="code" href="logging_8h.html#aae3f1f20f469bb0916e6a8e5728f114b">lk_log</a>(<span class="keyword">struct</span> lk_ctx *ctx, <span class="keywordtype">int</span> priority,
<a name="l00018"></a>00018             <span class="keyword">const</span> <span class="keywordtype">char</span> *file, <span class="keywordtype">int</span> line, <span class="keyword">const</span> <span class="keywordtype">char</span> *fn,
<a name="l00019"></a>00019             <span class="keyword">const</span> <span class="keywordtype">char</span> *fmt, ...);
<a name="l00020"></a>00020 
<a name="l00021"></a><a class="code" href="logging_8h.html#a6a1574ba2e8c0c67fe625aa33c37ed2c">00021</a> <span class="preprocessor">#define lk_log_cond(ctx, level, arg...) \</span>
<a name="l00022"></a>00022 <span class="preprocessor">        do { \</span>
<a name="l00023"></a>00023 <span class="preprocessor">                if (ctx-&gt;log_priority &gt;= level) \</span>
<a name="l00024"></a>00024 <span class="preprocessor">                        lk_log(ctx, level, __FILE__, __LINE__, __func__, ## arg);\</span>
<a name="l00025"></a>00025 <span class="preprocessor">        } while (0)</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span>
<a name="l00032"></a><a class="code" href="logging_8h.html#a68833971ccc3504e77bf4c1a05746cbf">00032</a> <span class="preprocessor">#define DBG(ctx, arg...)  lk_log_cond(ctx, LOG_DEBUG,   ## arg)</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span>
<a name="l00039"></a><a class="code" href="logging_8h.html#ab0792e079d2a815d88e26c8b43726d5d">00039</a> <span class="preprocessor">#define INFO(ctx, arg...) lk_log_cond(ctx, LOG_INFO,    ## arg)</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span>
<a name="l00046"></a><a class="code" href="logging_8h.html#a5b369c5045b19e2bc6920acf99a819a0">00046</a> <span class="preprocessor">#define WARN(ctx, arg...) lk_log_cond(ctx, LOG_WARNING, ## arg)</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span>
<a name="l00053"></a><a class="code" href="logging_8h.html#a28a83b7434a47abd558b8714d5fc27e5">00053</a> <span class="preprocessor">#define ERR(ctx, arg...)  lk_log_cond(ctx, LOG_ERR,     ## arg)</span>
<a name="l00054"></a>00054 <span class="preprocessor"></span>
<a name="l00055"></a>00055 <span class="preprocessor">#endif </span><span class="comment">/* LK_LOGGING_H */</span>
</pre></div></div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Thu Dec 15 2016 16:02:39 for libkeymap by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>