|
Oracle Fusion Middleware Java API Reference for Oracle WebLogic Server 12c (12.2.1) Part Number E55141-01 P4 Change 1723563 on 2015/10/09 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LogFileMBean
Configures the location, file-rotation criteria, and number of files that a WebLogic Server uses to store log messages. The methods in this class configure both server and domain log files.
Field Summary | |
---|---|
static String |
DEFAULT_FILE_NAME The default value for the log file name. |
static int |
MAX_ROTATED_FILES The maximum number that you can specify for FileCount . |
static String |
NONE No log file rotation. |
static String |
SIZE Rotation based on file size. |
static String |
TIME Rotation based on elapsed time. |
static String |
TIME_FORMAT The format string for the rotation start time. |
Fields inherited from interface weblogic.management.configuration.ConfigurationMBean |
---|
DEFAULT_EMPTY_BYTE_ARRAY |
Method Summary | |
---|---|
abstract int |
getBufferSizeKB() Gets the underlying log buffer size in kilobytes |
abstract String |
getDateFormatPattern() The date format pattern used for rendering dates in the log. |
abstract int |
getFileCount() The maximum number of log files that the server creates when it rotates the log. |
abstract int |
getFileMinSize() The size (1 - 2097150 kilobytes) that triggers the server to move log messages to a separate file. |
abstract String |
getFileName() The name of the file that stores current log messages. |
abstract int |
getFileTimeSpan() The interval (in hours) at which the server saves old log messages to another file. |
abstract String |
getLogFileRotationDir() The directory where the rotated log files will be stored. |
abstract boolean |
getRotateLogOnStartup() Specifies whether a server rotates its log file during its startup cycle. |
abstract String |
getRotationTime() Determines the start time (hour and minute) for a time-based rotation sequence. |
abstract String |
getRotationType() Criteria for moving old log messages to a separate file. |
abstract boolean |
isNumberOfFilesLimited() Indicates whether to limit the number of log files that this server instance creates to store old messages. |
abstract void |
setBufferSizeKB(int size) Sets the underlying log buffer size in kilobytes |
abstract void |
setDateFormatPattern(String dateFormat) |
abstract void |
setFileCount(int numberOfFiles) Sets the value of the FileCount attribute. |
abstract void |
setFileMinSize(int kBytes) Sets the value of the FileMinSize attribute. |
abstract void |
setFileName(String fileName) Sets the name of the file that stores current log messages. |
abstract void |
setFileTimeSpan(int hours) Sets the value of the FileTimeSpan attribute. |
abstract void |
setFileTimeSpanFactor(long factor) |
abstract void |
setLogFileRotationDir(String dirPath) Sets the value of the LogFileRotationDir attribute. |
abstract void |
setNumberOfFilesLimited(boolean value) Sets the value of the NumberOfFilesLimited attribute. |
abstract void |
setRotateLogOnStartup(boolean value) Sets the value of the RotateLogOnStartup attribute. |
abstract void |
setRotationTime(String when) Sets the value of the RotationTime attribute. |
abstract void |
setRotationType(String rotationType) Sets the value of the RotationType attribute. |
Methods inherited from interface weblogic.management.configuration.ConfigurationMBean |
---|
freezeCurrentValue, getId, getInheritedProperties, getName, getNotes, isDynamicallyCreated, isInherited, isSet, restoreDefaultValue, setComments, setDefaultedMBean, setName, setNotes, setPersistenceEnabled, unSet |
Methods inherited from interface weblogic.management.WebLogicMBean |
---|
getMBeanInfo, getObjectName, getParent, getType, isCachingDisabled, isRegistered, setParent |
Methods inherited from interface javax.management.DynamicMBean |
---|
getAttribute, getAttributes, invoke, setAttribute, setAttributes |
Methods inherited from interface javax.management.MBeanRegistration |
---|
postDeregister, postRegister, preDeregister, preRegister |
Methods inherited from interface javax.management.NotificationBroadcaster |
---|
addNotificationListener, getNotificationInfo, removeNotificationListener |
Methods inherited from interface weblogic.descriptor.DescriptorBean |
---|
addPropertyChangeListener, createChildCopyIncludingObsolete, getParentBean, isEditable, removePropertyChangeListener |
Field Detail |
---|
static final String SIZE
static final String TIME
static final String NONE
static final String TIME_FORMAT
static final String DEFAULT_FILE_NAME
The default value for the log file name.
static final int MAX_ROTATED_FILES
FileCount
.
Method Detail |
---|
String getDateFormatPattern()
The date format pattern used for rendering dates in the log. The DateFormatPattern string conforms to the specification of the java.text.SimpleDateFormat
class.
void setDateFormatPattern(String dateFormat)
String getFileName()
The name of the file that stores 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 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.
To include a time and date stamp in the file name when the log file is rotated, add java.text.SimpleDateFormat
variables to the file name. Surround each variable with percentage (%
) characters.
For example, if the file name is defined to be myserver_%yyyy%_%MM%_%dd%_%hh%_%mm%.log
, the log file will be named myserver_yyyy_mm_dd_hh_mm.log
.
When the log file is rotated, the rotated file name contains the date stamp. For example, if the log file is rotated for the first time on 2 April, 2003 at 10:05 AM, the log file that contains the old messages will be named myserver_2003_04_02_10_05.log00001
.
If you do not include a time and date stamp, the rotated log files are numbered in order of creation. For example, myserver.log00007
.
void setFileName(String fileName) throws InvalidAttributeValueException
Sets the name of the file that stores current log messages.
fileName
- The new fileName valueInvalidAttributeValueException
LogFileMBean.getFileName()
, MachineMBean
String getRotationType()
Criteria for moving old log messages to a separate file.
NONE
Messages accumulate in a single file. You must erase the contents of the file when the size is too large. Note that WebLogic Server sets a threshold size limit of 500 MB before it forces a hard rotation to prevent excessive log file growth.SIZE
When the log file reaches the size that you specify in FileMinSize
, the server renames the file as SERVER_NAME.lognnnnn
.TIME
At each time interval that you specify in TimeSpan
, the server renames the file as SERVER_NAME.lognnnnn
.After the server renames a file, subsequent messages accumulate in a new file with the name that you specified as the log file name.
void setRotationType(String rotationType) throws InvalidAttributeValueException
Sets the value of the RotationType attribute.
rotationType
- SIZE, TIME or NONE.InvalidAttributeValueException
LogFileMBean.getRotationType()
void setNumberOfFilesLimited(boolean value) throws InvalidAttributeValueException, DistributedManagementException
Sets the value of the NumberOfFilesLimited attribute.
value
- The new numberOfFilesLimited valueInvalidAttributeValueException
DistributedManagementException
LogFileMBean.isNumberOfFilesLimited()
boolean isNumberOfFilesLimited()
Indicates whether to limit the number of log files that this server instance creates to store old messages. (Requires that you specify a file rotation type of SIZE
or TIME
.)
After the server reaches this limit, it deletes the oldest log file and creates a new log file with the latest suffix.
If you do not enable this option, the server creates new files indefinitely and you must clean up these files as you require.
LogFileMBean.getRotationType()
int getFileCount()
The maximum number of log files that the server creates when it rotates the log. This number does not include the file that the server uses to store current messages. (Requires that you enable Number of Files Limited.)
LogFileMBean.isNumberOfFilesLimited()
void setFileCount(int numberOfFiles) throws InvalidAttributeValueException, DistributedManagementException
Sets the value of the FileCount attribute.
numberOfFiles
- The new fileCount valueInvalidAttributeValueException
DistributedManagementException
LogFileMBean.getFileCount()
int getFileTimeSpan()
The interval (in hours) at which the server saves old log messages to another file. (Requires that you specify a file rotation type of TIME
.)
LogFileMBean.getRotationType()
String getRotationTime()
Determines the start time (hour and minute) for a time-based rotation sequence.
At the time that this value specifies, the server renames the current log file. Thereafter, the server renames the log file at an interval that you specify in File Time Span.
Note that WebLogic Server sets a threshold size limit of 500 MB before it forces a hard rotation to prevent excessive log file growth.
Use the following format: H:mm
, where
H
is Hour in day (0-23)mm
is the minute in hourLogFileMBean.getRotationType()
, LogFileMBean.getFileTimeSpan()
void setRotationTime(String when) throws InvalidAttributeValueException
Sets the value of the RotationTime attribute.
when
- The new rotationTime valueInvalidAttributeValueException
LogFileMBean.getRotationTime()
void setFileTimeSpan(int hours) throws InvalidAttributeValueException, DistributedManagementException
Sets the value of the FileTimeSpan attribute.
hours
- The new fileTimeSpan valueInvalidAttributeValueException
DistributedManagementException
LogFileMBean.getFileTimeSpan()
void setFileTimeSpanFactor(long factor)
int getFileMinSize()
SERVER_NAME.lognnnnn
and create a new one to store subsequent messages. (Requires that you specify a file rotation type of Size
.)LogFileMBean.getRotationType()
void setFileMinSize(int kBytes) throws InvalidAttributeValueException, DistributedManagementException
Sets the value of the FileMinSize attribute.
kBytes
- The new fileMinSize valueInvalidAttributeValueException
DistributedManagementException
LogFileMBean.getFileMinSize()
boolean getRotateLogOnStartup()
Specifies whether a server rotates its log file during its startup cycle. The default value in production mode is false.
void setRotateLogOnStartup(boolean value)
Sets the value of the RotateLogOnStartup attribute.
String getLogFileRotationDir()
The directory where the rotated log files will be stored. By default the rotated files are stored in the same directory where the log file is stored.
void setLogFileRotationDir(String dirPath)
Sets the value of the LogFileRotationDir attribute.
LogFileMBean.getLogFileRotationDir()
int getBufferSizeKB()
void setBufferSizeKB(int size)
|
Copyright 1996, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Oracle Fusion Middleware Java API Reference for Oracle WebLogic Server 12c (12.2.1) Part Number E55141-01 P4 Change 1723563 on 2015/10/09 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |