|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 java.lang.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 java.lang.String |
NONE
No logfile rotation. |
static java.lang.String |
SIZE
Rotation based on file size. |
static java.lang.String |
TIME
Rotation based on elapsed time. |
static java.lang.String |
TIME_FORMAT
The format string for the rotation start time. |
Fields inherited from class weblogic.management.configuration.ConfigurationMBean |
CACHING_STUB_SVUID,
DEFAULT_EMPTY_BYTE_ARRAY |
Method Summary | |
int |
getFileCount()
The maximum number of log files that the server creates when it rotates the log. |
int |
getFileMinSize()
The size (1 - 65535 kilobytes) that triggers the server to move log messages to a separate file. |
java.lang.String |
getFileName()
The name of the file that stores current log messages. |
int |
getFileTimeSpan()
The interval (in hours) at which the server saves old log messages to another file. |
java.lang.String |
getRotationTime()
Determines the start time (hour and minute) for a time-based rotation sequence. |
java.lang.String |
getRotationType()
Criteria for moving old log messages to a separate file: NONE . |
boolean |
isNumberOfFilesLimited()
Indicates whether a server will limit the number of log files that it creates when it rotates the log. |
void |
setFileCount(int numberOfFiles)
The maximum number of files that the server creates to store old log messages. |
void |
setFileMinSize(int kBytes)
The size (1 - 65535 kilobytes) that triggers the server to move log messages to a separate file. |
void |
setFileName(java.lang.String fileName)
The name of the file that stores current log messages. |
void |
setFileTimeSpan(int hours)
The interval (in hours) at which the server saves old log messages to another file. |
void |
setNumberOfFilesLimited(boolean value)
Limits the number of files that a server creates to store old messages to the maximum number specified in FileCount . |
void |
setRotateLogOnStartup(boolean value)
|
void |
setRotationTime(java.lang.String when)
Determines the start time (hour and minute) for a time-based rotation sequence. |
void |
setRotationType(java.lang.String rotationType)
Criteria for moving old log messages to a separate file: NONE . |
Methods inherited from interface weblogic.management.configuration.ConfigurationMBean |
freezeCurrentValue,
getNotes,
restoreDefaultValue,
setComments,
setDefaultedMBean,
setNotes,
setPersistenceEnabled |
Methods inherited from interface weblogic.management.WebLogicMBean |
getMBeanInfo,
getName,
getObjectName,
getParent,
getType,
isCachingDisabled,
isRegistered,
setName,
setParent |
Methods inherited from interface javax.management.DynamicMBean |
getAttribute,
getAttributes,
invoke,
setAttribute,
setAttributes |
Methods inherited from interface javax.management.MBeanRegistration |
postDeregister,
postRegister,
preRegister |
Methods inherited from interface javax.management.NotificationBroadcaster |
addNotificationListener,
getNotificationInfo,
removeNotificationListener |
Field Detail |
public static final java.lang.String SIZE
public static final java.lang.String TIME
public static final java.lang.String NONE
public static final java.lang.String TIME_FORMAT
public static final java.lang.String DEFAULT_FILE_NAME
public static final int MAX_ROTATED_FILES
FileCount
.Method Detail |
public java.lang.String getFileName()
serverName.log
.
However, if name of the parent cannot be obtained for some reason, then the
name is weblogic.log
.
A relative pathname is relative to the server's root directory.
public void setFileName(java.lang.String fileName) throws javax.management.InvalidAttributeValueException
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 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.log
.
If you do not include a time and date stamp, the rotated log files
are numbered in order of creation. For example,
myserver.log0007
.
fileName
- The new fileName valueMachineMBean
public java.lang.String getRotationType()
NONE
. Messages accumulate in a single file. You must
erase the contents of the file when the size is unwieldy.
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
FileName.n
.
TIME
. At each time interval that you specify in
TimeSpan
, the server renames the file as FileName.n
.
After the server renames a file, subsequent messages accumulate in a new
file with the name that you specified in FileName
.
public void setRotationType(java.lang.String rotationType) throws javax.management.InvalidAttributeValueException
NONE
. Messages accumulate in a single file. You must
erase the contents of the file when the size is unwieldy.
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
FileName.n
.
TIME
. At each time interval that you specify in
RotationTime
and TimeSpan
, the server renames the
file as FileName.n
.
After the server renames a file, subsequent messages accumulate in a new
file with the name that you specified in FileName
.
rotationType
- SIZE, TIME or NONE.public void setNumberOfFilesLimited(boolean value) throws javax.management.InvalidAttributeValueException, DistributedManagementException
FileCount
.
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. You must clean up these files as you require.
This value is relevant only if you specify a file rotation type of
SIZE
or TIME
.
value
- The new numberOfFilesLimited valuepublic boolean isNumberOfFilesLimited()
getFileCount
.
public int getFileCount()
isNumberOfFilesLimited
is true
and setRotationType
is either Size
or Time
.
public void setFileCount(int numberOfFiles) throws javax.management.InvalidAttributeValueException, DistributedManagementException
FileName
).
This value is relevant only if you enable NumberOfFilesLimited
.
numberOfFiles
- The new fileCount valuepublic int getFileTimeSpan()
public java.lang.String getRotationTime()
FileTimeSpan
.
Use the following format: k:mm
, where
k
is the hour in a 24-hour format.
mm
is the minute
If the specified time has already past, then the server starts its file rotation immediately.
By default, the rotation cycle begins immediately.
public void setRotationTime(java.lang.String when) throws javax.management.InvalidAttributeValueException
FileTimeSpan
.
Use the following format: k:mm
, where
k
is the hour in a 24-hour format.
mm
is the minute
If the specified time has already past, then the server starts its file rotation immediately.
By default, the rotation cycle begins immediately.
when
- The new rotationTime valuepublic void setFileTimeSpan(int hours) throws javax.management.InvalidAttributeValueException, DistributedManagementException
hours
- The new fileTimeSpan valuepublic int getFileMinSize()
FileName.n
and create
a new one to store subsequent messages. (This field is relevant only if you
set Rotation Type to By Size.)
public void setFileMinSize(int kBytes) throws javax.management.InvalidAttributeValueException, DistributedManagementException
FileName.n
and create
a new one to store subsequent messages. (This field is relevant only if you
set Rotation Type to By Size.)
kBytes
- The new fileMinSize valuepublic void setRotateLogOnStartup(boolean value)
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs81 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |