Defining Logging Servlets in sip.xml Configuring the Logging Level and Destination

8-24 Oracle WebLogic Communications Server Administration Guide WebLogic Communication Services uses for selecting SIP requests and responses to place in the log file. A typical pattern definition defines a condition for matching a particular value in a SIP message header. For example, the sample response-pattern.xml used by the msgTraceLogger Servlet matches all MESSAGE requests. The contents of this descriptor are shown in Example 8–3 Sample response-pattern.xml for msgTraceLogger Servlet ?xml version=1.0 encoding=UTF-8? DOCTYPE pattern PUBLIC RegistrationOrganizationType LabelDefinition Language trace-pattern.dtd pattern equal varresponse.methodvar valueMESSAGEvalue equal pattern Additional operators and conditions for matching SIP messages are described in Section 8.7.6, trace-pattern.dtd Reference . Most conditions, such as the equal condition shown in Example 8–3 , require a variable var element that identifies the portion of the SIP message to evaluate. Table 8–2 lists some common variables and sample values. For additional variable names and examples, see Section 16: Mapping Requests to Servlets in the SIP Servlet API 1.1 specification http:jcp.orgenjsrdetail?id=289 ; Oracle WebLogic Communication Services enables mapping of both request and response variables to logging Servlets. Both request-pattern.xml and response-pattern.xml use the same Document Type Definition DTD. See Section 8.7.6, trace-pattern.dtd Reference for more information.

8.7.3.2 Using Servlet Parameters to Specify Logging Criteria

Pattern-matching criteria can also be specified as initialization parameters to the logging Servlet, rather than as separate XML documents. The parameter names used to specify matching criteria are request-pattern-string and response-pattern-string. They are defined along with the logging level and destination as described in Section 8.7.2, Configuring the Logging Level and Destination . Note: By default Oracle WebLogic Communication Services logs both requests and responses. If you do not want to log responses, you must define a response-pattern.xml file with empty matching criteria. Table 8–6 Pattern-matching Variables and Sample Values Variable Sample Values request.method, response.method MESSAGE, INVITE, ACK, BYE, CANCEL request.uri.user, response.uri.user guest, admin, joe request.to.host, response.to.host server.mydomain.com