aboutsummaryrefslogtreecommitdiff
path: root/doc/oscl_html/pvlogger__c_8h_source.html
blob: 8ff6ae69d145f34401049de655b3f93d6f2a4583 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!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"/>
<title>oscl: pvlogger_c.h Source File</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.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</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>
    </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>
<h1>pvlogger_c.h</h1><a href="pvlogger__c_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00010"></a>00010 <span class="preprocessor">#ifndef PVLOGGER_C_H_INCLUDED</span>
<a name="l00011"></a>00011 <span class="preprocessor"></span><span class="preprocessor">#define PVLOGGER_C_H_INCLUDED</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span>
<a name="l00013"></a>00013 <span class="preprocessor">#include &quot;<a class="code" href="osclconfig_8h.html" title="This file contains configuration information for the linux platform.">osclconfig.h</a>&quot;</span>
<a name="l00014"></a>00014 
<a name="l00015"></a>00015 <span class="preprocessor">#ifndef OSCL_IMPORT_REF</span>
<a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_IMPORT_REF</span>
<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00018"></a>00018 <span class="preprocessor"></span>
<a name="l00019"></a>00019 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span>
<a name="l00021"></a>00021 {
<a name="l00022"></a>00022 <span class="preprocessor">#endif</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span>
<a name="l00024"></a>00024 <span class="comment">//C-callable logging routines.</span>
<a name="l00025"></a>00025     <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keywordtype">void</span>* <a class="code" href="pvlogger__c_8h.html#adfe5f7b2dc8e29678f6d8cd9cf42c6dd">pvLogger_GetLoggerObject</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* tag);
<a name="l00026"></a>00026     <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keywordtype">int</span> <a class="code" href="pvlogger__c_8h.html#ac62c8ddf9e7fd8860b04899f195a0394">pvLogger_IsActive</a>(<span class="keywordtype">void</span>* logger, <span class="keywordtype">int</span> log_level);
<a name="l00027"></a>00027     <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keywordtype">void</span> <a class="code" href="pvlogger__c_8h.html#a6f0123243be152344f3b552566e5220a">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, ...);
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span>}
<a name="l00031"></a>00031 <span class="preprocessor">#endif</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span>
<a name="l00033"></a>00033 
<a name="l00034"></a>00034 <span class="comment">//Logging instrumentation level default.  To change this for a project, add a definition of</span>
<a name="l00035"></a>00035 <span class="comment">//PVLOGGER_C_INST_LEVEL to the osclconfig.h file.  This default sets level to 2 for release</span>
<a name="l00036"></a>00036 <span class="comment">//mode, full logging for debug build.</span>
<a name="l00037"></a>00037 
<a name="l00038"></a>00038 <span class="preprocessor">#ifndef PVLOGGER_C_INST_LEVEL</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#if (OSCL_RELEASE_BUILD)</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#define PVLOGGER_C_INST_LEVEL 2</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00042"></a><a class="code" href="pvlogger__c_8h.html#a720e1cdf55bf162ddd1ee5e73b13c415">00042</a> <span class="preprocessor"></span><span class="preprocessor">#define PVLOGGER_C_INST_LEVEL 5</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00044"></a>00044 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00045"></a>00045 <span class="preprocessor"></span>
<a name="l00046"></a>00046 <span class="comment">//Instrumentation levels.</span>
<a name="l00047"></a><a class="code" href="pvlogger__c_8h.html#a7eba6148e80c1990ebd64775c14a6919">00047</a> <span class="preprocessor">#define PVLOGMSG_C_INST_REL   0</span>
<a name="l00048"></a><a class="code" href="pvlogger__c_8h.html#a0fa392a57c28a16bfca06cf2079ff1cd">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#a43252e2f6d38f75eef8bb5110a5ab618">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#a1531fc4eb04b3fd585e619bb54fada08">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#afdb3503de5424e0fcf08333a94fb5815">00051</a> <span class="preprocessor"></span><span class="preprocessor">#define PVLOGMSG_C_INST_LLDBG 4</span>
<a name="l00052"></a>00052 <span class="preprocessor"></span>
<a name="l00053"></a>00053 <span class="comment">//Logging levels</span>
<a name="l00054"></a><a class="code" href="pvlogger__c_8h.html#ae1f6d8cef39b26b891e939e2d8c2f031">00054</a> <span class="preprocessor">#define PVLOGMSG_C_EMERG 0</span>
<a name="l00055"></a><a class="code" href="pvlogger__c_8h.html#a1f36024be33a92d4d994ebee7750c1a4">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#ad63418e039874ccf663c8788da7b62aa">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#af76014a0382904d7e1cf99921a85ecab">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#a6f546f8493674655354ec23de6725dcf">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#aac5c32717ec11870e609bdec1f7ff9ad">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#a0b890145c03afe177426a8bbb2cd4267">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#a8cbd9f099a33e251f616fa0365036d48">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#af6cc0336d4f9cc08fb6bb36776fc584b">00062</a> <span class="preprocessor"></span><span class="preprocessor">#define PVLOGMSG_C_STACK_DEBUG 8</span>
<a name="l00063"></a>00063 <span class="preprocessor"></span>
<a name="l00064"></a>00064 <span class="comment">/*</span>
<a name="l00065"></a>00065 <span class="comment">//Example Usage:</span>
<a name="l00066"></a>00066 <span class="comment"></span>
<a name="l00067"></a>00067 <span class="comment">#if (PVLOGGER_C_INST_LEVEL &gt; PVLOGMSG_C_INST_LLDBG)</span>
<a name="l00068"></a>00068 <span class="comment">            if(pvLogger_IsActive(logger ,PVLOGMSG_C_ERR))</span>
<a name="l00069"></a>00069 <span class="comment">                pvLogger_LogMsgString( logger ,  0 ,&quot;Some message, value %d&quot;, intvalue );</span>
<a name="l00070"></a>00070 <span class="comment"></span>
<a name="l00071"></a>00071 <span class="comment">#endif</span>
<a name="l00072"></a>00072 <span class="comment">*/</span>
<a name="l00073"></a>00073 
<a name="l00074"></a>00074 
<a name="l00075"></a>00075 
<a name="l00076"></a>00076 <span class="preprocessor">#endif // PVLOGGER_C_H_INCLUDED</span>
</pre></div></div>
<hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
<address style="align: left;"><small>Posting Version: CORE_9.004.1.1 </small>
</small></address>
</body>
</html>