26 October, 2018
We are going to discuss about:
This chapter describes how you use WebLogic Server logging services to monitor server, subsystem, and application events. It explains how you configure WebLogic Server to write messages to log files and listen for the log messages that WebLogic Server broadcasts. It also describes how to view log messages through the WebLogic Server Administration Console.
WebLogic Server subsystems use logging services to provide information about events such as the deployment of new applications or the failure of one or more subsystems. A server instance uses them to communicate its status and respond to specific events. For example, you can use WebLogic logging services to report error conditions or listen for log messages from a specific subsystem.
Server Log Files and Domain Log Files
Each WebLogic Server instance writes all messages from its subsystems and applications to a server log file that is located on the local host computer. By default, the server log file is located in the logs directory below the server instance root directory; for example, DOMAIN_NAME\servers\SERVER_NAME\logs\SERVER_NAME.log, where DOMAIN_NAME is the name of the directory in which you located the domain and SERVER_NAME is the name of the server.
In addition to writing messages to the server log file, each server instance forwards a subset of its messages to a domain-wide log file. By default, servers forward only messages of severity level NOTICE or higher. While you can modify the set of messages that are forwarded, servers can never forward messages of the DEBUG severity level.
The domain log file provides a central location from which to view the overall status of the domain. The domain log resides in the Administration Server logs directory. The default name and location for the domain log file is DOMAIN_NAME\servers\ADMIN_SERVER_NAME\logs\DOMAIN_NAME.log,
Where DOMAIN_NAME is the name of the directory in which you located the domain and ADMIN_SERVER_NAME is the name of the Administration Server.
Message Formats & Attributes
Log Message Format
When a WebLogic Server instance writes a message to the server log file, the first line of each message begins with #### followed by the message attributes. Each attribute is contained between angle brackets.
Here is an example of a message in the server log file:
####<Sept 22, 2004 10:46:51 AM EST> <Notice> <WebLogicServer> <MyComputer>
<examplesServer> <main> <<WLS Kernel>> <> <null> <1080575211904> <BEA-000360> <Server started in RUNNING mode>
In this example, the message attributes are: Locale-formatted Timestamp, Severity, Subsystem, Machine Name, Server Name, Thread ID, User ID, Transaction ID, Diagnostic Context ID, Raw Time Value, Message ID, and Message Text. (A subsequent section, “Message Attributes,” describes each attribute.)
Format of Output to Standard Out and Standard Error
When a WebLogic Server instance writes a message to standard out, the output does not include the #### prefix and does not include the Server Name, Machine Name, Thread ID, User ID, Transaction ID, Diagnostic Context ID, and Raw Time Value fields.
Here is an example of how the message from the previous section would be printed to standard out:
<Sept 22, 2004 10:51:10 AM EST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode
In this example, the message attributes are: Locale-formatted Timestamp, Severity, Subsystem, Message ID, and Message Text.
The messages for all WebLogic Server instances contain a consistent set of attributes. In addition, if your application uses WebLogic logging services to generate messages, its messages will contain these attributes.
Message Severity & Messages Forwarded to Domain Log
The severity attribute of a WebLogic Server log message indicates the potential impact of the event or condition that the message reports.
Message catalogs are available in HTML format on e-docs as part of the documentation deliverable. You can search for messages by error number using the search engine.
Configuring WebLogic Logging Services
Logging Configuration Tasks: Main Steps
The following steps summarize how you configure and filter log messages that WebLogic Server generates. Related documentation and later sections in this guide describe these steps in more detail.
Environment -> Servers -> Logging…
Filtering WebLogic Server Log Messages
WebLogic logging services provide several filtering options that give you the flexibility to determine which messages are written to WebLogic Server log files and standard out, and which are written to the log file and standard out that a client JVM maintains.
Create Log Filters
Domain -> Configuration -> Log Filters and then click on New
Step 2: Specify the Name of the Filter and click on Finish Button and Click on Activate Changes
Step 3: Specify the conditions according to the requirement and then apply save and Activate Changes.
Assigning a Log Filter to Server
Servers -> Select Server -> Logging -> Advanced and then apply the Filter according to the requirement.
Using the Console to Monitor
The Administration Console offers some monitoring capabilities:
Monitoring Running Servers
Monitoring Individual Servers
Server Status and Threads Monitoring
TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills .