(file) Return to TraceComponents.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2