uCosminexus Application Server, Web Service Development Guide

[Contents][Glossary][Index][Back][Next]

39.3.5 Log format

This subsection describes the format of the operation log, maintenance log, exception log, and communication log.

Organization of this subsection
(1) Operation log and maintenance log format
(2) Exception log and communication log format
(3) Character encoding in communication logs
(4) Names of the HTTP header output to the communication log

(1) Operation log and maintenance log format

The following table lists and describes the output items and contents of the operation log and maintenance log.

Table 39-13 Operation log and maintenance log format

Items Output contents
Number This is the serial number of a trace code (4 digits). Starts from 0000 and returns to 0000 when the number goes to 9999.
Date Date of output (yyyy/mm/dd format)
Time Time of output (hh:mm:ss.nnn format)
Application name
  • For Web Services and Web Service clients: cjw
  • For the cjwsimport command: cjwsimport
  • For the apt command: cjwapt
  • For the cjwsgen command: cjwsgen
  • For the WS-RM 1.2functionality: wsrm
  • For Web resources: cjr
Process identifier Process identifier (hexadecimal)
Thread identifier Thread identifier (hexadecimal)
Message ID Message ID
Message types Message types
  • ER: Indicates that an error message was displayed.
  • EC: Indicates that an exception was caught.
  • None: Indicates trace information other than above.
Message text Main message body
CRLF End of record sign

(2) Exception log and communication log format

The following table lists and describes the output items and contents of the exception log and communication log.

Table 39-14 Exception log and communication log format

Items Output contents
Date Date of output (yyyy/mm/dd format)
Time Time of output (hh:mm:ss format)
Source class name Class name that issued the log
Level Log importance level
Message Main message body

The following example describes a communication log output for the JAX-WS functionality:

2008/10/14 13:09:44 com.cosminexus.xml.ws.transport.http.client.HttpTransportPipe process
Information: KDJW30011-I http client message
---[HTTP request]---
SOAPAction: ""
Content-Type: text/xml;charset="utf-8"
X-hitachi-rootAp: MTgxNDczMTYyLzE2ODgvMC84MDI=
X-hitachi-clientAp: MTgxNDczMTYyLzE2ODgvMC84MDI=
Accept: text/xml, multipart/related, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
<?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:jaxWsTest1 xmlns:ns2="http://example.com/sample"><information>Invocation test.</information><count>1003</count></ns2:jaxWsTest1></S:Body></S:Envelope>
2008/10/14 13:09:45 com.cosminexus.xml.ws.transport.http.client.HttpTransportPipe process
Information: KDJW30012-I http client message
---[HTTP response 200]---
HTTP/1.1 200 OK
Keep-alive: timeout=3, max=100
Date: Tue, 14 Oct 2008 04:09:44 GMT
Content-type: text/xml;charset=utf-8
Connection: Keep-Alive
Transfer-encoding: chunked
Server: Cosminexus HTTP Server
<?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:jaxWsTest1Response xmlns:ns2="http://example.com/sample"><return>We've got your #1003 message &quot;Invocation test.&quot;! It's 2008.10.14 13:09:45 now. See ya!</return></ns2:jaxWsTest1Response></S:Body></S:Envelope>

The following example describes a communication log output for the JAX-RS functionality:

In the case of a JAX-RS functionality, even if the property is not specified in the action definition file, you can set up whether to output communication logs for the Web applications having Web resources, by including the following servlet initialization parameters and values in web.xml.

No. Servlet initialization parameter Value Operation
1 com.sun.jersey.spi.container.ContainerRequestFilters com.cosminexus.jersey.api.container.filter.LoggingFilter The HTTP request information is output to a communication log.
2 com.sun.jersey.spi.container.ContainerResponseFilters com.cosminexus.jersey.api.container.filter.LoggingFilter The HTTP response information is output to a communication log.

#
If you specify a value other than the values mentioned in the above table, the settings will be ignored.
If a property is specified in the action definition file, you cannot set up whether to output communication logs for the Web applications having Web resources.

You can also set up whether to control the output of the entity information for the Web applications having Web resources. The following table describes the servlet initialization parameters and values.

No. Servlet initialization parameter Value Operation
1 com.sun.jersey.config.feature.logging.DisableEntitylogging True The entity information cannot be output to a communication log.
False The entity information cannot be output to a communication log.

#
If you specify a value other than true or false, the value of the property acquired from the common definition file (cjrconf.properties ) is used and the entity information is output to the communication log. Note that the value specified by using web.xml is ignored.

(3) Character encoding in communication logs

Regardless of the character encoding in a SOAP Message (for Web Services) and an HTTP message (for Web resources), the character encoding specified in the property of the following action definition files is applied to the communication log. By default, the platform dependent encoding is used in the communication log.

com.cosminexus.jaxws.logger.runtime.transport.encoding property (for Web Services)

com.cosminexus.jaxrs.logger.runtime.transport.encoding property (for Web resources)

If the character encoding in a message and a communication log differs, some of the characters in the communication log might become invalid depending on the combination. For example, if the character encoding in a message is UTF-8 and the character encoding in the communication log is MS932, and if the message contains the characters that do not exist in MS932, such characters become invalid in the communication log. Therefore, when developing Web Services or Web resources, we recommend that you define the available character codes or character sets, and report the same to a Web Service client or a Web resource client developer (WSDL public destination).

Points to note depending upon the functionality used:

(4) Names of the HTTP header output to the communication log

The name of the HTTP header that is output to the communication log always has only the first character in upper case, regardless of the HTTP messages actually sent and received (HTTP messages including SOAP messages).

Example: Content-type