How to configure HTTP Logging format for access log in Weblogic

HTTP logging is much essential if you are using Weblogic as web server. 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. Enabling this can give a track who or what is trying to access your application from which IP and when. 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-ip: The IP address of the server.
cs-username: The 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-uri: The full requested URI. This field has type <uri>, as defined in the W3C specification.
sc-status: Status 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-sitename: The Internet service name and instance number that was running on the client.
s-port: The Port number of the server.
time-taken: Time taken for transaction to complete in seconds, field has type <fixed>, as defined in the W3C specification.
sc-substatus: The substatus error code.
cs-host: The host header name, if any.
cs-version: The protocol version —HTTP or FTP —that the client used.

 

Advertisements

About Swapratim

Author is Founder & Owner of Marvin.ai - Enterprise AI Chatbot Development Company. Currently he is busy developing chatbots for restaurants and other small & medium business domains. Marvin.ai has set foot in Denmark now. In his early career, he has worked in development & support perusing different roles & responsibilities. He also used to work on several innovative projects. Android apps developed by him like – In Time SMS, AndroLogic are freely available in Google Play Store. He has several in house tool built available for free usage on internet. Apart from this, he likes to share his learning with all which he had learned over years. The sole purpose of this blog is to share the author's knowledge in IT, passion for travel and recent trends with you. Hope you will enjoy his contents.
Aside | This entry was posted in Technology, WebLogic and tagged , , , , , , . Bookmark the permalink.

2 Responses to How to configure HTTP Logging format for access log in Weblogic

  1. Pingback: WebLogic (Oracle) I HTTP logovi | Linux, Windows, Heklanje, Kuhinja

  2. Gourav says:

    In Weblogic 12c if I apply cs-username in extended format the username value is missing in the logs. Is there any solution on this?

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s