Log files
Contents
Overview
The operator can automatically override WebLogic Server, domain, and introspector .log and .out locations.
This occurs if the Domain logHomeEnabled field is explicitly set to true, or if logHomeEnabled isn’t set
and domainHomeSourceType is set to PersistentVolume.
When overriding, the log location will be the location specified by the logHome setting.
WebLogic Server .out files contain a subset of WebLogic Server .log files.
The operator, by default, echoes these .out files to each server pod log.
To disable this behavior, set the Domain includeServerOutInPodLog to false.
Optionally, you can monitor a WebLogic Server and its log using an Elastic Stack (previously referred to as the ELK Stack, after Elasticsearch, Logstash, and Kibana). For an example, see the WebLogic Server Elastic Stack sample.
Warning
Kubernetes stores pod logs on each of its nodes, and, depending on the Kubernetes implementation, extra steps may be necessary to limit their disk space usage. For more information, see Kubernetes Logging Architecture .
WebLogic Server log file location
When logHomeEnabled is false,
WebLogic Server log files are placed in a subdirectory <domain.spec.domainHome>/servers/<server name>/logs.
When logHomeEnabled is true,
WebLogic Server log files are placed in a subdirectory <domain.spec.logHome>/servers/<server name>/logs
by default, or alternatively placed in subdirectory <domain.spec.logHome> when logHomeLayout is set to Flat.
For example, here is the default layout of the log files under the logHome root:
WebLogic Server log file rotation and size
If you want to fine tune the .log and .out rotation behavior for WebLogic Servers and domains, then
you can update the related Log MBean in your WebLogic configuration. Alternatively, for WebLogic
Servers, you can set corresponding system properties in JAVA_OPTIONS:
-
Here are some WLST offline examples for creating and accessing commonly tuned Log MBeans:
-
Here is sample WLST offline code for commonly tuned Log MBean attributes:
-
Here are the defaults for commonly tuned Log MBean attributes:
Log MBean Attribute Production Mode Default Development Mode Default FileMinSize (in kilobytes) 5000 500 FileCount 100 7 RotateLogOnStartup false true -
For WebLogic Server
.logand.outfiles (including both dynamic and configured servers), you can alternatively set logging attributes using system properties that start withweblogic.log.and that end with the corresponding Log MBean attribute name.For example, you can include
-Dweblogic.log.FileMinSize=1000 -Dweblogic.log.FileCount=10 -Dweblogic.log.RotateLogOnStartup=trueindomain.spec.serverPod.env.name.JAVA_OPTIONSto set the behavior for all WebLogic Servers in your domain. For information about settingJAVA_OPTIONS, see Domain resource .