1 kumpf 1.2 //%/////////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,
4 // The Open Group, Tivoli Systems
5 //
6 // Permission is hereby granted, free of charge, to any person obtaining a copy
7 // of this software and associated documentation files (the "Software"), to
8 // deal in the Software without restriction, including without limitation the
9 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 // sell copies of the Software, and to permit persons to whom the Software is
11 // furnished to do so, subject to the following conditions:
12 //
13 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
14 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
15 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
16 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
17 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
18 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 //
22 kumpf 1.2 //==============================================================================
23 //
24 // Author: Sushma Fernandes, Hewlett-Packard Company (sushma_fernandes@hp.com)
25 //
26 // Modified By: Yi Zhou (yi_zhou@hp.com)
27 // Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)
28 //
29 //%/////////////////////////////////////////////////////////////////////////////
30
31 // REVIEW: Ask how tracing works (note to myself).
32
33 #ifndef Pegasus_TraceComponents_h
34 #define Pegasus_TraceComponents_h
35
36 PEGASUS_NAMESPACE_BEGIN
37
38 /** Steps for adding tracing to a new component:
39
40 1. Identify whether the component being added belongs to an existing list
41 of trace components. Refer to the trace component list
42 (TRACE_COMPONENT_LIST []) defined in this file. If an appropriate
43 kumpf 1.2 component is found, note the component identifier (starts with a TRC_)
44 from the list of TRACE_COMPONENT_IDs defined in this file and skip
45 step 2. If there is no appropriate component available, move to step 2.
46
47 2. Add the new component to this file. This step includes adding a
48 component name and a component identifier.
49
50 a. Add the <component name> to the TRACE_COMPONENT_LIST []. This name
51 will be used to turn on tracing for the component.
52 b. Add the component identifier to the TRACE_COMPONENT_ID list.
53 The Component identifier must be formed by prefixing the component
54 name with "TRC_"(E.g. TRC_<component name>). The developer should
55 use the component identifier, to identify a component in all
56 trace calls.
57
58 (NOTE: It is important that both the TRACE_COMPONENT_ID and
59 TRACE_COMPONENT_LIST [] are updated appropriately to include the
60 new component.)
61
62 3. Add the trace calls to the component code. The TRACE_COMPONENT_ID
63 should be used to identify a component in all trace calls.
64 kumpf 1.2 */
65
66 /** String constants for naming the various Trace components.
67 These strings will used to while turning on tracing for the respective
68 components. The component list needs to be updated whenever a new trace
69 component needs to be added. An appropriate string constant should be
70 defined to identify the component to be traced.
71
72 Example:
73 The following example shows the usage of trace component names.
74 The setTraceComponents method is used to turn on tracing for the
75 components, config and repository. The component names are passed as a
76 comma separated list.
77
78 Tracer::setTraceComponents( "Config,Repository");
79
80 */
81 static char const* TRACE_COMPONENT_LIST[] =
82 {
83 "Channel",
84 "XmlParser",
85 kumpf 1.2 "XmlWriter",
86 "XmlReader",
87 "XmlIO",
88 "Http",
89 "CimData",
90 "ProvManager",
91 "Repository",
92 "Dispatcher",
93 "OsAbstraction",
94 "Config",
95 "IndDelivery",
96 "IndHandler",
97 "Authentication",
98 "Authorization",
99 "UserManager",
100 "SubscriptionService",
101 "Registration",
102 "Shutdown",
103 "Server",
104 "IndicationService",
105 "ConfigurationManager",
106 kumpf 1.2 "MessageQueueService",
107 "ProviderManager",
108 "ObjectResolution",
109 "WQL",
110 "Thread",
111 "MetaDispatcher",
112 "IPC",
113 "IndicationHandlerService",
114 "CIMExportRequestDispatcher",
115 "Memory",
116 "SSL",
117 "ControlProvider",
118 "AsyncOpNode",
119 "WmiMapper",
120 "WmProvider"
121 };
122 /** Constants identifying the Trace components. These constants are used by
123 the component to identify its Trace messages. The component ID needs to
124 be updated whenever a new trace component needs to be added.
125 The constants need to be prepended with "TRC_". The position of the
126 constant identifier needs to correspond with the position of the constant
127 kumpf 1.2 string definition in the TRACE_COMPONENT_LIST.
128
129 Example:
130 The Configuration framework component will be using the constant,
131 TRC_CONFIG while invoking the trace call.
132
133 PEG_METHOD_ENTER(TRC_CONFIG, "ConfigManager::updateCurrentValue()");
134 */
135
136 enum TRACE_COMPONENT_ID
137 {
138 TRC_CHANNEL,
139 TRC_XML_PARSER,
140 TRC_XML_WRITER,
141 TRC_XML_READER,
142 TRC_XML_IO,
143 TRC_HTTP,
144 TRC_CIM_DATA,
145 TRC_PROV_MANAGER,
146 TRC_REPOSITORY,
147 TRC_DISPATCHER,
148 kumpf 1.2 TRC_OS_ABSTRACTION,
149 TRC_CONFIG,
150 TRC_IND_DELIVERY,
151 TRC_IND_HANDLER,
152 TRC_AUTHENTICATION,
153 TRC_AUTHORIZATION,
154 TRC_USER_MANAGER,
155 TRC_SUBSCRIPTION_SERVICE,
156 TRC_REGISTRATION,
157 TRC_SHUTDOWN,
158 TRC_SERVER,
159 TRC_INDICATION_SERVICE,
160 TRC_CONFIGURATION_MANAGER,
161 TRC_MESSAGEQUEUESERVICE,
162 TRC_PROVIDERMANAGER,
163 TRC_OBJECTRESOLUTION,
164 TRC_WQL,
165 TRC_THREAD,
166 TRC_META_DISPATCH,
167 TRC_IPC,
168 TRC_IND_HANDLE,
169 kumpf 1.2 TRC_EXP_REQUEST_DISP,
170 TRC_MEMORY,
171 TRC_SSL,
172 TRC_CONTROLPROVIDER,
173 TRC_ASYNC_OPNODE,
174 TRC_WMI_MAPPER,
175 TRC_WMIPROVIDER
176 };
177
178 PEGASUS_NAMESPACE_END
179
180 #endif /* Pegasus_TraceComponents */
|