Home | History | Annotate | Download | only in oscl_html
      1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
      2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
      3 <title>pvlogger_c.h Source File</title>
      4 <link href="doxygen.css" rel="stylesheet" type="text/css">
      5 </head><body>
      6 <!-- Generated by Doxygen 1.2.18 -->
      7 <center>
      8 <a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; <a class="qindex" href="globals.html">Globals</a> &nbsp; </center>
      9 <hr><h1>pvlogger_c.h</h1><a href="pvlogger__c_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 
     10 00010 <span class="preprocessor">#ifndef PVLOGGER_C_H_INCLUDED</span>
     11 00011 <span class="preprocessor"></span><span class="preprocessor">#define PVLOGGER_C_H_INCLUDED</span>
     12 00012 <span class="preprocessor"></span>
     13 00013 <span class="preprocessor">#include "<a class="code" href="osclconfig_8h.html">osclconfig.h</a>"</span>
     14 00014 
     15 00015 <span class="preprocessor">#ifndef OSCL_IMPORT_REF</span>
     16 00016 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_IMPORT_REF</span>
     17 00017 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
     18 00018 <span class="preprocessor"></span>
     19 00019 <span class="preprocessor">#ifdef __cplusplus</span>
     20 00020 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span>
     21 00021 {
     22 00022 <span class="preprocessor">#endif</span>
     23 00023 <span class="preprocessor"></span>
     24 00024 <span class="comment">//C-callable logging routines.</span>
     25 00025     OSCL_IMPORT_REF <span class="keywordtype">void</span>* <a class="code" href="pvlogger__c_8h.html#a15">pvLogger_GetLoggerObject</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* tag);
     26 00026     OSCL_IMPORT_REF <span class="keywordtype">int</span> <a class="code" href="pvlogger__c_8h.html#a16">pvLogger_IsActive</a>(<span class="keywordtype">void</span>* logger, <span class="keywordtype">int</span> log_level);
     27 00027     OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="pvlogger__c_8h.html#a17">pvLogger_LogMsgString</a>(<span class="keywordtype">void</span>* logger, <span class="keywordtype">int</span> msgID, <span class="keyword">const</span> <span class="keywordtype">char</span> * fmt, ...);
     28 00028 
     29 00029 <span class="preprocessor">#ifdef __cplusplus</span>
     30 00030 <span class="preprocessor"></span>}
     31 00031 <span class="preprocessor">#endif</span>
     32 00032 <span class="preprocessor"></span>
     33 00033 
     34 00034 <span class="comment">//Logging instrumentation level default.  To change this for a project, add a definition of</span>
     35 00035 <span class="comment">//PVLOGGER_C_INST_LEVEL to the osclconfig.h file.  This default sets level to none for release</span>
     36 00036 <span class="comment">//mode, full logging for debug build.</span>
     37 00037 
     38 00038 <span class="preprocessor">#ifndef PVLOGGER_C_INST_LEVEL</span>
     39 00039 <span class="preprocessor"></span><span class="preprocessor">#if defined(NDEBUG)</span>
     40 00040 <span class="preprocessor"></span><span class="preprocessor">#define PVLOGGER_C_INST_LEVEL 0</span>
     41 00041 <span class="preprocessor"></span><span class="preprocessor">#else</span>
     42 <a name="l00042"></a><a class="code" href="pvlogger__c_8h.html#a0">00042</a> <span class="preprocessor"></span><span class="preprocessor">#define PVLOGGER_C_INST_LEVEL 5</span>
     43 00043 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
     44 00044 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
     45 00045 <span class="preprocessor"></span>
     46 00046 <span class="comment">//Instrumentation levels.</span>
     47 <a name="l00047"></a><a class="code" href="pvlogger__c_8h.html#a1">00047</a> <span class="preprocessor">#define PVLOGMSG_C_INST_REL   0</span>
     48 <a name="l00048"></a><a class="code" href="pvlogger__c_8h.html#a2">00048</a> <span class="preprocessor"></span><span class="preprocessor">#define PVLOGMSG_C_INST_PROF  1</span>
     49 <a name="l00049"></a><a class="code" href="pvlogger__c_8h.html#a3">00049</a> <span class="preprocessor"></span><span class="preprocessor">#define PVLOGMSG_C_INST_HLDBG 2</span>
     50 <a name="l00050"></a><a class="code" href="pvlogger__c_8h.html#a4">00050</a> <span class="preprocessor"></span><span class="preprocessor">#define PVLOGMSG_C_INST_MLDBG 3</span>
     51 <a name="l00051"></a><a class="code" href="pvlogger__c_8h.html#a5">00051</a> <span class="preprocessor"></span><span class="preprocessor">#define PVLOGMSG_C_INST_LLDBG 4</span>
     52 00052 <span class="preprocessor"></span>
     53 00053 <span class="comment">//Logging levels</span>
     54 <a name="l00054"></a><a class="code" href="pvlogger__c_8h.html#a6">00054</a> <span class="preprocessor">#define PVLOGMSG_C_EMERG 0</span>
     55 <a name="l00055"></a><a class="code" href="pvlogger__c_8h.html#a7">00055</a> <span class="preprocessor"></span><span class="preprocessor">#define PVLOGMSG_C_ALERT 1</span>
     56 <a name="l00056"></a><a class="code" href="pvlogger__c_8h.html#a8">00056</a> <span class="preprocessor"></span><span class="preprocessor">#define PVLOGMSG_C_CRIT 2</span>
     57 <a name="l00057"></a><a class="code" href="pvlogger__c_8h.html#a9">00057</a> <span class="preprocessor"></span><span class="preprocessor">#define PVLOGMSG_C_ERR 3</span>
     58 <a name="l00058"></a><a class="code" href="pvlogger__c_8h.html#a10">00058</a> <span class="preprocessor"></span><span class="preprocessor">#define PVLOGMSG_C_WARNING 4</span>
     59 <a name="l00059"></a><a class="code" href="pvlogger__c_8h.html#a11">00059</a> <span class="preprocessor"></span><span class="preprocessor">#define PVLOGMSG_C_NOTICE 5</span>
     60 <a name="l00060"></a><a class="code" href="pvlogger__c_8h.html#a12">00060</a> <span class="preprocessor"></span><span class="preprocessor">#define PVLOGMSG_C_INFO 6</span>
     61 <a name="l00061"></a><a class="code" href="pvlogger__c_8h.html#a13">00061</a> <span class="preprocessor"></span><span class="preprocessor">#define PVLOGMSG_C_STACK_TRACE 7</span>
     62 <a name="l00062"></a><a class="code" href="pvlogger__c_8h.html#a14">00062</a> <span class="preprocessor"></span><span class="preprocessor">#define PVLOGMSG_C_STACK_DEBUG 8</span>
     63 00063 <span class="preprocessor"></span>
     64 00064 <span class="comment">/*</span>
     65 00065 <span class="comment">//Example Usage:</span>
     66 00066 <span class="comment"></span>
     67 00067 <span class="comment">#if (PVLOGGER_C_INST_LEVEL &gt; PVLOGMSG_C_INST_LLDBG)</span>
     68 00068 <span class="comment">                        if(pvLogger_IsActive(logger ,PVLOGMSG_C_ERR))</span>
     69 00069 <span class="comment">                                pvLogger_LogMsgString( logger ,  0 ,"Some message, value %d", intvalue );</span>
     70 00070 <span class="comment"></span>
     71 00071 <span class="comment">#endif</span>
     72 00072 <span class="comment">*/</span>
     73 00073 
     74 00074 
     75 00075 
     76 00076 <span class="preprocessor">#endif // PVLOGGER_C_H_INCLUDED</span>
     77 </pre></div><hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
     78 <address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small>
     79 </small></address>
     80 </body>
     81 </html>
     82