| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> |
| <title>pvlogger_c.h Source File</title> |
| <link href="doxygen.css" rel="stylesheet" type="text/css"> |
| </head><body> |
| <!-- Generated by Doxygen 1.2.18 --> |
| <center> |
| <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="globals.html">Globals</a> </center> |
| <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 |
| 00010 <span class="preprocessor">#ifndef PVLOGGER_C_H_INCLUDED</span> |
| 00011 <span class="preprocessor"></span><span class="preprocessor">#define PVLOGGER_C_H_INCLUDED</span> |
| 00012 <span class="preprocessor"></span> |
| 00013 <span class="preprocessor">#include "<a class="code" href="osclconfig_8h.html">osclconfig.h</a>"</span> |
| 00014 |
| 00015 <span class="preprocessor">#ifndef OSCL_IMPORT_REF</span> |
| 00016 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_IMPORT_REF</span> |
| 00017 <span class="preprocessor"></span><span class="preprocessor">#endif</span> |
| 00018 <span class="preprocessor"></span> |
| 00019 <span class="preprocessor">#ifdef __cplusplus</span> |
| 00020 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> |
| 00021 { |
| 00022 <span class="preprocessor">#endif</span> |
| 00023 <span class="preprocessor"></span> |
| 00024 <span class="comment">//C-callable logging routines.</span> |
| 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); |
| 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); |
| 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, ...); |
| 00028 |
| 00029 <span class="preprocessor">#ifdef __cplusplus</span> |
| 00030 <span class="preprocessor"></span>} |
| 00031 <span class="preprocessor">#endif</span> |
| 00032 <span class="preprocessor"></span> |
| 00033 |
| 00034 <span class="comment">//Logging instrumentation level default. To change this for a project, add a definition of</span> |
| 00035 <span class="comment">//PVLOGGER_C_INST_LEVEL to the osclconfig.h file. This default sets level to none for release</span> |
| 00036 <span class="comment">//mode, full logging for debug build.</span> |
| 00037 |
| 00038 <span class="preprocessor">#ifndef PVLOGGER_C_INST_LEVEL</span> |
| 00039 <span class="preprocessor"></span><span class="preprocessor">#if defined(NDEBUG)</span> |
| 00040 <span class="preprocessor"></span><span class="preprocessor">#define PVLOGGER_C_INST_LEVEL 0</span> |
| 00041 <span class="preprocessor"></span><span class="preprocessor">#else</span> |
| <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> |
| 00043 <span class="preprocessor"></span><span class="preprocessor">#endif</span> |
| 00044 <span class="preprocessor"></span><span class="preprocessor">#endif</span> |
| 00045 <span class="preprocessor"></span> |
| 00046 <span class="comment">//Instrumentation levels.</span> |
| <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> |
| <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> |
| <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> |
| <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> |
| <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> |
| 00052 <span class="preprocessor"></span> |
| 00053 <span class="comment">//Logging levels</span> |
| <a name="l00054"></a><a class="code" href="pvlogger__c_8h.html#a6">00054</a> <span class="preprocessor">#define PVLOGMSG_C_EMERG 0</span> |
| <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> |
| <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> |
| <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> |
| <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> |
| <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> |
| <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> |
| <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> |
| <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> |
| 00063 <span class="preprocessor"></span> |
| 00064 <span class="comment">/*</span> |
| 00065 <span class="comment">//Example Usage:</span> |
| 00066 <span class="comment"></span> |
| 00067 <span class="comment">#if (PVLOGGER_C_INST_LEVEL > PVLOGMSG_C_INST_LLDBG)</span> |
| 00068 <span class="comment"> if(pvLogger_IsActive(logger ,PVLOGMSG_C_ERR))</span> |
| 00069 <span class="comment"> pvLogger_LogMsgString( logger , 0 ,"Some message, value %d", intvalue );</span> |
| 00070 <span class="comment"></span> |
| 00071 <span class="comment">#endif</span> |
| 00072 <span class="comment">*/</span> |
| 00073 |
| 00074 |
| 00075 |
| 00076 <span class="preprocessor">#endif // PVLOGGER_C_H_INCLUDED</span> |
| </pre></div><hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small> |
| <address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small> |
| </small></address> |
| </body> |
| </html> |