Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

WebLogic Server 6.0sp2 API Reference

## weblogic.management.configuration
Interface LogMBean

public interface LogMBean
extends ConfigurationMBean

Author:
  Copyright © 2001 BEA Systems, Inc. All Rights Reserved.

Field Summary
`static java.lang.String` | `DEFAULT_FILE_NAME` The default name of the file is based on the name of the parent of this this MBean.
`static int` | `MAX_ROTATED_FILES`
`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.

Method Summary
`int` | `getFileCount()`
`int` | `getFileMinSize()` Returns the minimum size (in kilobytes) that the error log file must reach before it is rolled over.
`java.lang.String` | `getFileName()` Returns name of the error log file, including the absolute directory path.
`int` | `getFileTimeSpan()` Timespan (in hours) after which logfile should be rotated.
`java.lang.String` | `getRotationType()` Return rotation type for this logfile.
`boolean` | `isNumberOfFilesLimited()`
`void` | `setFileCount(int numberOfFiles)` This attribute defines the number of file instances which are kept by the logging system, other than the current logfile.
`void` | `setFileMinSize(int kBytes)`
`void` | `setFileName(java.lang.String fileName)` Sets the log file name If the filepath is not absolute, the path is assumed to be relative to the root directory of the machine on which the server is running.
`void` | `setFileTimeSpan(int hours)`
`void` | `setNumberOfFilesLimited(boolean value)` This value is relevant only when rotation is on.
`void` | `setRotationType(java.lang.String rotationType)` Set rotation type for this logfile.

Methods inherited from interface weblogic.management.configuration.ConfigurationMBean
`getNotes, setNotes`

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, preDeregister, preRegister`

Methods inherited from interface javax.management.NotificationBroadcaster
`addNotificationListener, getNotificationInfo, removeNotificationListener`

Field Detail

### SIZE

    public static final java.lang.String SIZE

  Rotation based on file size.

### TIME

    public static final java.lang.String TIME

  Rotation based on elapsed time.

### NONE

    public static final java.lang.String NONE

  No logfile rotation.

### DEFAULT_FILE_NAME

    public static final java.lang.String DEFAULT_FILE_NAME

  The default name of the file is based on the name of the parent of this this MBean. For example, for server log it is "serverName".log . The name defined below is used only if name of the parent cannot be obtained for some reason.

### MAX_ROTATED_FILES

    public static final int MAX_ROTATED_FILES

Method Detail

### getFileName

    public java.lang.String getFileName()

  Returns name of the error log file, including the absolute directory path. Each server/client has one and only one logfile on the machine it is running. This file contains all error messages generated by the server/ client and application code running within it. User can configure the system such that the logfile is rotated based on size or time. By default, file rotation is disabled.

  File Names:

  The current logfile is always the one whose name equals value of the this attribute. When the current file exceeds the size or time limit, it is renamed to a versioned name with a format like <FileName>.nnnnn . Also, if 'NumberOfFilesLimited' is 'true' and curent number of old files exceed 'FileCount' the oldest file is deleted. Hence, at any time the number rotated logfiles equals the value of 'FileCount'.

  A configurable MBean attribute
  Default Value: DEFAULT_FILE_NAME
  Old Property: weblogic.system.logFile

### setFileName

    public void setFileName(java.lang.String fileName)
                     throws javax.management.InvalidAttributeValueException

  Sets the log file name If the filepath is not absolute, the path is assumed to be relative to the root directory of the machine on which the server is running.

  See Also:
    `MachineMBean`

### getRotationType

    public java.lang.String getRotationType()

  Return rotation type for this logfile.

  Returns:
    SIZE, TIME or NONE.

### setRotationType

    public void setRotationType(java.lang.String rotationType)
                         throws javax.management.InvalidAttributeValueException

  Set rotation type for this logfile.

  Default Value: NONE
  Legal Value: value.equals(weblogic.management.configuration.LogMBean.SIZE) || value.equals(weblogic.management.configuration.LogMBean.TIME) || value.equals(weblogic.management.configuration.LogMBean.NONE)
  Legal Values: SIZE,TIME,NONE
  Parameters:
    `rotationType` - SIZE, TIME or NONE.

### setNumberOfFilesLimited

    public void setNumberOfFilesLimited(boolean value)
                                 throws javax.management.InvalidAttributeValueException,
                                        DistributedManagementException

  This value is relevant only when rotation is on. If the value provided is 'false', the server creates new logfiles indefinitely. In this case it is the administrators responsibility to clean up files as required. Otherwise, the value of 'FileCount' is used.

  A dynamic MBean attribute

### isNumberOfFilesLimited

    public boolean isNumberOfFilesLimited()

  Default Value: false

### getFileCount

    public int getFileCount()

  Default Value: 7

### setFileCount

    public void setFileCount(int numberOfFiles)
                      throws javax.management.InvalidAttributeValueException,
                             DistributedManagementException

  This attribute defines the number of file instances which are kept by the logging system, other than the current logfile. This value is ignored, if the value of 'NumberOfFilesLimited' is 'false'.

  A dynamic MBean attribute
  Legal Value: (value <= weblogic.management.configuration.LogMBean.MAX_ROTATED_FILES && value > 0 )

### getFileTimeSpan

    public int getFileTimeSpan()

  Timespan (in hours) after which logfile should be rotated.

  Default Value: 24

### setFileTimeSpan

    public void setFileTimeSpan(int hours)
                         throws javax.management.InvalidAttributeValueException,
                                DistributedManagementException

  A dynamic MBean attribute
  Legal Value: ( value > 0 )

### getFileMinSize

    public int getFileMinSize()

  Returns the minimum size (in kilobytes) that the error log file must reach before it is rolled over.

  A configurable MBean attribute
  Default Value: 500
  Old Property: weblogic.system.maxLogFileSize

### setFileMinSize

    public void setFileMinSize(int kBytes)
                        throws javax.management.InvalidAttributeValueException,
                               DistributedManagementException

  A dynamic MBean attribute
  Legal Value: value > 0 && value < 65535

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs60
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD