Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.portal.struts.logging
Class StrutsLogFactory

    java.lang.Object
      LogFactory
          com.ibm.portal.struts.logging.StrutsLogFactory

    public class StrutsLogFactory

extends LogFactory

Struts Logging Factory

Since:
  5.1.0.1

Constructor Summary
`StrutsLogFactory()` StrutsLoggingFactory ctr.

Method Summary
`java.lang.Object` | `getAttribute(java.lang.String name)` Return the configuration attribute with the specified name (if any), or `null` if there is no such attribute.
`java.lang.String[]` | `getAttributeNames()` Return an array containing the names of all currently defined configuration attributes.
`Log` | `getInstance(java.lang.Class clazz)` Convenience method to derive a name from the specified class and call `getInstance(String)` with it.
`Log` | `getInstance(java.lang.String name)` Construct (if necessary) and return a `Log` instance, using the factory's current set of configuration attributes.
`void` | `release()` Release any internal references to previously created `Log` instances returned by this factory.
`void` | `removeAttribute(java.lang.String name)` Remove any configuration attribute associated with the specified name.
`void` | `setAttribute(java.lang.String name, java.lang.Object value)` Set the configuration attribute with the specified name.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### StrutsLogFactory

    public StrutsLogFactory()

  StrutsLoggingFactory ctr.

Method Detail

### getAttribute

    public java.lang.Object getAttribute(java.lang.String name)

  Return the configuration attribute with the specified name (if any), or `null` if there is no such attribute.

  Parameters:
    `name` - Name of the attribute to return

### getAttributeNames

    public java.lang.String[] getAttributeNames()

  Return an array containing the names of all currently defined configuration attributes. If there are no such attributes, a zero length array is returned.

### getInstance

    public Log getInstance(java.lang.Class clazz)
                    throws LogConfigurationException

  Convenience method to derive a name from the specified class and call `getInstance(String)` with it.

  Parameters:
    `clazz` - Class for which a suitable Log name will be derived
  Throws:
    `LogConfigurationException` - if a suitable `Log` instance cannot be returned

### getInstance

    public Log getInstance(java.lang.String name)
                    throws LogConfigurationException

  Construct (if necessary) and return a `Log` instance, using the factory's current set of configuration attributes.

  Parameters:
    `name` - Logical name of the `Log` instance to be returned
  Throws:
    `LogConfigurationException` - if a suitable `Log` instance cannot be returned

### release

    public void release()

  Release any internal references to previously created `Log` instances returned by this factory. This is useful environments like servlet containers, which implement application reloading by throwing away a ClassLoader. Dangling references to objects in that class loader would prevent garbage collection.

### removeAttribute

    public void removeAttribute(java.lang.String name)

  Remove any configuration attribute associated with the specified name. If there is no such attribute, no action is taken.

  Parameters:
    `name` - Name of the attribute to remove

### setAttribute

    public void setAttribute(java.lang.String name,
                             java.lang.Object value)

  Set the configuration attribute with the specified name. Calling this with a `null` value is equivalent to calling `removeAttribute(name)`.

  Parameters:
    `name` - Name of the attribute to set
    `value` - Value of the attribute to set, or `null` to remove any setting for this attribute

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD