Saturday, 19 September 2020

Steps to configure HTTP Logging format for access log in WebLogic

HTTP logging is much essential if you are using WebLogic as web server. Enabling this can give a track who or what is trying to access your application from which IP and when.

Also you can use this feature to scrutinize the incoming requests coming to the server via external IPs. You can find the HTTP log (access.log) for any server within WebLogic domain. 

Follow the below steps to configure HTTP Logging and log syntax argument

Go to this path:

Home-> Environment -> Servers

Select the server that you want to configure HTTP logging.

Go to Logging tab.

Find the sub-tab HTTP and click on that.

http1

Go to Advanced section at the bottom of the pane. You will see the Format section.

Now click on Lock & Edit button in the Change Center at the top-left of the page. This will enable the drop down of the Format menu. Change it into Extended mode from Common format. This will help to use excess parameters to be shown within access.log.

https2

Now you need to incorporate the necessary parameters in Extended Logging Format Details which are needed to be shown as column in access.log. There are several options you can choose from the below syntaxes, each of it will create a column with corresponding values:

c-ipThe IP address of the server.
cs-usernameThe name of the authenticated user who accessed your server. Anonymous users are indicated by a hyphen.
date Date at which transaction completed, field has type <date>, as defined in the W3C specification.
time Time at which transaction completed, field has type <time>, as defined in the W3C specification.
cs-method : The request method, for example GET or POST. This field has type <name>, as defined in the W3C specification.
cs-uriThe full requested URI. This field has type <uri>, as defined in the W3C specification.
sc-statusStatus code of the response, for example (404) indicating a “File not found” status. This field has type <integer>, as defined in the W3C specification.
cs(User-Agent) : The browser type that the client used.
s-sitenameThe Internet service name and instance number that was running on the client.
s-portThe Port number of the server.
time-takenTime taken for transaction to complete in seconds, field has type <fixed>, as defined in the W3C specification.
sc-substatusThe substatus error code.
cs-hostThe host header name, if any.
cs-versionThe protocol version —HTTP or FTP —that the client used.

No comments:

Post a Comment

All about WebLogic t3 and t3s Protocol

WebLogic's  implementation of the RMI specification uses a proprietary protocol known as T3. You can think of T3 (and secure T3S) as a l...