How to activate access and error logs for WebSphere

Posted by Marcel Friedmann on 10:53 AM with No comments
Webservers typically provide so called access and error logs for diagnosting incomming http requests.
This logs are activated by default for Apache webserver and IBM HTTP Server.

Java EE application servers do have a web container that also serve http content. However the access and error logs are disabled by default for Websphere.

To active the access and error logs go to
Servers > Server types > WebSphere application servers > <your-server-name> > NCSA access and HTTP error logging

Select "Enable logging service at server start-up" and make sure that "Enable access logging" and "Enable error logging" are selected. Restart the server afterwards.



The NCSA access log format specifies which format is used when logging client information.
  • Common: The log entries contain the requested resource and other some http informations. Example log entry:
    0:0:0:0:0:0:0:1 - - [25/Oct/2014:10:41:08 +0200] "GET /wasPerfTool/dtd/ HTTP/1.1" 200 -
  • Combined: In addition to the common format, the log entries contains the referral, the user agent, and cookie.
    Example log entry:
    0:0:0:0:0:0:0:1 - - [25/Oct/2014:10:48:31 +0200] "GET /wasPerfTool/dtd/ HTTP/1.1" 200 - "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.104 Safari/537.36" "-"
The error logging level simply defines the detail of the logged information.

Categories: