Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| WebLogic Integration
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.logging
Class LogContext

    java.lang.Object
      |
      +--com.bea.logging.LogContext

public class LogContext
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

A class that encapsulates information to help determine its logging configuration in the logging framework. Specifically, a LogContext is a logging category and locale. This class is tightly coupled to the underlying implementation of the logging framework. In other words, if the underlying implementation changes, this class is likely to change.

Author:
  Copyright © 2000, 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
  Serialized Form

Constructor Summary
`LogContext()` Creates an object used to retrieve an `ILogger` instance for the ROOT of the logging hierarchy and does NOT allow for localization of log messages.
`LogContext(java.lang.String strContext)` Creates an object used to retrieve an `ILogger` instance associated with `strContext` in the logging hierarchy and does NOT allow for localization of log messages.
`LogContext(java.lang.String strContext, java.util.Locale locale)` Creates an object used to retrieve an `ILogger` instance associated with `strContext` in the logging hierarchy and does attempts to create a `ResourceBundle` using `strContext` and `locale`.

Method Summary
`void` | `appendContext(java.lang.String strAppend)` Appends additional context information to this context in a implementation dependent manner.
`java.lang.Object` | `clone()`
`void` | `dumpLogContext()`
`boolean` | `equals(java.lang.Object obj)`
`java.util.Locale` | `getLocale()`
`LogContext` | `getParent()`
`int` | `hashCode()`
`static java.lang.String` | `join(java.lang.String strBase, java.lang.String strNew)` Joins `strBase` with `strNew` in a logging framework dependent manner.
`LogContext` | `subContext(java.lang.String strSubContext)` Creates a new LogContext object with this context as its base context.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### LogContext

    public LogContext()

  Creates an object used to retrieve an `ILogger` instance for the ROOT of the logging hierarchy and does NOT allow for localization of log messages. Using the `ILogger` methods that rely on a `ResourceBundle` will result in an `IllegalStateException`. If the invoker desires localization of log messages, they should use constructor that takes a `java.util.Locale`.

  See Also:
    LogContext(String, Locale)

### LogContext

    public LogContext(java.lang.String strContext)

  Creates an object used to retrieve an `ILogger` instance associated with `strContext` in the logging hierarchy and does NOT allow for localization of log messages. Using the `ILogger` methods that rely on a `ResourceBundle` will result in an `IllegalStateException`. If the invoker desires localization of log messages, they should use constructor that takes a `java.util.Locale`.

  Parameters:
    `strContext` - - identifies this context in the logging category hierarchy.
  See Also:
    LogContext(String, Locale)

### LogContext

    public LogContext(java.lang.String strContext,
                      java.util.Locale locale)

  Creates an object used to retrieve an `ILogger` instance associated with `strContext` in the logging hierarchy and does attempts to create a `ResourceBundle` using `strContext` and `locale`.

  Parameters:
    `strContext` - - identifies an `ILogger` instance in the logging framework.
    `locale` - - identifies which locale to use for localization of log messages.
  Throws:
    MissingResourceException - - the `ResourceBundle` for `strContext` and `locale` cannot be located; make sure the class or properties file is in the JVM's classpath.

Method Detail

### getParent

    public LogContext getParent()

  Returns:
    the parent context for this context; may return null if this context is the logical root, i.e. has context ""

### appendContext

    public void appendContext(java.lang.String strAppend)

  Appends additional context information to this context in a implementation dependent manner. This method is synchronized because it alters the state of the object.

  Parameters:
    `strAppend` - - additional contextual information for determining logging configuration in the logging framework.

### subContext

    public LogContext subContext(java.lang.String strSubContext)

  Creates a new LogContext object with this context as its base context.

  Parameters:
    `strSubContext` - - additional contextual information used to identify a new sub context below this one in the hierarchy.
  Returns:
    a new LogContext object

### toString

    public final java.lang.String toString()

  Returns:
    a String representation of this context name.
  Overrides:
    toString in class java.lang.Object

### getLocale

    public final java.util.Locale getLocale()

  Returns:
    the `java.util.Locale` for this; may be null.

### clone

    public java.lang.Object clone()
                           throws java.lang.CloneNotSupportedException

  Overrides:
    clone in class java.lang.Object

### equals

    public boolean equals(java.lang.Object obj)

  Overrides:
    equals in class java.lang.Object

### hashCode

    public int hashCode()

  Overrides:
    hashCode in class java.lang.Object

### dumpLogContext

    public void dumpLogContext()

### join

    public static java.lang.String join(java.lang.String strBase,
                                        java.lang.String strNew)

  Joins `strBase` with `strNew` in a logging framework dependent manner.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| WebLogic Integration
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

WebLogic Integration (WLI)