Oracle
WebLogic Server Logs
Oracle
WebLogic Server logging services provide facilities for writing, viewing,
filtering, and listening for log messages. These log messages are generated by
the Oracle WebLogic Server instances, subsystems, and Java EE applications that
run on Oracle WebLogic Server or on client JVMs.
Oracle
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. Debugging can also be enabled on individual subsystems to
include additional life cycle.
The
main subsystems that use logging services are:
•Server
•HTTP
•JTS
•JMS
•JDBC
Oracle
WebLogic Server can keep a log of all HTTP transactions in a text file, named access.log
by default. This file can also be used to determine which resources were
accessed more often. This file can also track the amount of data being received
by and sent back to HTTP clients.
Oracle
WebLogic Server provides a hierarchical Logger tree that lets you specify the
Severity level for:
•Generated
message catalog Logger classes from the XML I18N catalog using weblogic.i18ngen
(Use the weblogic.i18ngen
utility to parse message catalogs [XML files] to produce Logger
and TextFormatter
classes used for localizing the text in log messages.)
•Instances
of the Commons Logging APIs when the Oracle WebLogic Server implementation of
the commons org.apache.commons.logging.LogFactory
interface is enabled
All
Loggers inherit their Severity level from the nearest parent in the tree. You
can, however, explicitly set the Severity level of a Logger, thereby overriding
the level that is set for the nearest parent. You can set the Severity level
for loggers from the Administration Console, WLST, or the command line.
The
LogMBean interface offers two new attributes:
•LoggerSeverity
•LoggerSeverityProperties
Note: Logging in Oracle WebLogic Server 10.3
now provides finer control of Logging Severity, down to the level of the
logging source that is generating the message. This is provided via a set of
severities that are defined in the weblogic.logging.Severities
class.
Note: Log files have no performance
indicators.
Server
and Domain Logs
Each
Oracle WebLogic Server instance writes all the 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 created 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
domainwide log file. By default, servers forward only messages of the NOTICE
severity level or higher. Although 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
created the domain and ADMIN_SERVER_NAME is the name of the administration server.
The server log messages and the log file
communicate events and conditions that affect the operation of the server or
the application. Some subsystems can also be configured to maintain additional
log files to provide an audit of the subsystem’s interactions under normal
operating conditions.
Configuring
Server Logging
In
the left pane of the console, expand Environment
and
select Servers.
In
the Servers table, click the name of the server instance whose logging you want
to configure.
Click
the Logging > General tab. The available options include:
•Log file name: The name of the file that stores the
current log messages. Usually, it is a computed value based on the name of the
parent of this MBean. For example, for a server log, it is logs/SERVER_NAME.log.
However, if the name of the parent cannot be obtained, the file name is weblogic.log.
If you specify a relative pathname, it is interpreted as relative to the
server’s root directory.
•Rotation type
-None: Messages accumulate in a single file.
You must erase the contents of the file when the size is too big. Note that
Oracle WebLogic Server sets a threshold size limit of 500 MB before it forces a
hard rotation to prevent excessive log file growth.
-By Size: When the log file reaches the size that
you specify in “Rotation file size,” the server renames the file FileName.n.
-By Time: At each time interval that you specify in
“Begin rotation time” and “Rotation interval,” the server renames the file FileName.n.
•Limit number of retained files: After
the server reaches this limit, it deletes the oldest log file and creates a new
log file with the latest suffix.