Package org.jboss.logmanager.config

## Interface LogContextConfiguration

    public interface LogContextConfiguration

A log context configuration.

Author:
  David M. Lloyd

### Nested Class Summary

Nested Classes
`static class` `LogContextConfiguration.Factory` The factory class for persistent configurations.

### Method Summary

All Methods Instance Methods Abstract Methods
`ErrorManagerConfiguration` `addErrorManagerConfiguration​(java.lang.String moduleName, java.lang.String className, java.lang.String errorManagerName, java.lang.String... constructorProperties)`
`FilterConfiguration` `addFilterConfiguration​(java.lang.String moduleName, java.lang.String className, java.lang.String filterName, java.lang.String... constructorProperties)`
`FormatterConfiguration` `addFormatterConfiguration​(java.lang.String moduleName, java.lang.String className, java.lang.String formatterName, java.lang.String... constructorProperties)`
`HandlerConfiguration` `addHandlerConfiguration​(java.lang.String moduleName, java.lang.String className, java.lang.String handlerName, java.lang.String... constructorProperties)` Add a handler configuration.
`LoggerConfiguration` `addLoggerConfiguration​(java.lang.String loggerName)`
`PojoConfiguration` `addPojoConfiguration​(java.lang.String moduleName, java.lang.String className, java.lang.String pojoName, java.lang.String... constructorProperties)` Add a POJO configuration.
`void` `commit()` Commit the current changes into the running logging configuration.
`void` `forget()` Clear all the current changes and restore this object to its original state.
`ErrorManagerConfiguration` `getErrorManagerConfiguration​(java.lang.String errorManagerName)`
`java.util.List<java.lang.String>` `getErrorManagerNames()`
`FilterConfiguration` `getFilterConfiguration​(java.lang.String filterName)`
`java.util.List<java.lang.String>` `getFilterNames()`
`FormatterConfiguration` `getFormatterConfiguration​(java.lang.String formatterName)`
`java.util.List<java.lang.String>` `getFormatterNames()`
`HandlerConfiguration` `getHandlerConfiguration​(java.lang.String handlerName)`
`java.util.List<java.lang.String>` `getHandlerNames()`
`LogContext` `getLogContext()` Get the log context being configured by this configuration object.
`LoggerConfiguration` `getLoggerConfiguration​(java.lang.String loggerName)`
`java.util.List<java.lang.String>` `getLoggerNames()`
`PojoConfiguration` `getPojoConfiguration​(java.lang.String pojoName)` Gets the POJO configuration.
`java.util.List<java.lang.String>` `getPojoNames()` A list of the POJO configuration names.
`void` `prepare()` Prepares the current changes.
`boolean` `removeErrorManagerConfiguration​(java.lang.String errorManagerName)`
`boolean` `removeFilterConfiguration​(java.lang.String filterName)`
`boolean` `removeFormatterConfiguration​(java.lang.String formatterName)`
`boolean` `removeHandlerConfiguration​(java.lang.String handlerName)` Remove a handler configuration.
`boolean` `removeLoggerConfiguration​(java.lang.String loggerName)`
`boolean` `removePojoConfiguration​(java.lang.String pojoName)` Removes the POJO configuration.

### Method Detail

#### getLogContext

    LogContext getLogContext()

Get the log context being configured by this configuration object.

Returns:
  the log context

#### addLoggerConfiguration

    LoggerConfiguration addLoggerConfiguration​(java.lang.String loggerName)

#### removeLoggerConfiguration

    boolean removeLoggerConfiguration​(java.lang.String loggerName)

#### getLoggerConfiguration

    LoggerConfiguration getLoggerConfiguration​(java.lang.String loggerName)

#### getLoggerNames

    java.util.List<java.lang.String> getLoggerNames()

#### addHandlerConfiguration

    HandlerConfiguration addHandlerConfiguration​(java.lang.String moduleName,
                                                 java.lang.String className,
                                                 java.lang.String handlerName,
                                                 java.lang.String... constructorProperties)

Add a handler configuration.

Parameters:
  `moduleName` - the module name, or `null` to use the logmanager's class path
  `className` - the class name of the handler (must not be `null`)
  `handlerName` - the name of the handler (must be unique within this configuration and not `null`)
  `constructorProperties` - an optional list of constructor property names
Returns:
  the new handler configuration

#### removeHandlerConfiguration

    boolean removeHandlerConfiguration​(java.lang.String handlerName)

Remove a handler configuration. Also removes handler from everything it was added to.

Parameters:
  `handlerName` - the handler name to remove
Returns:
  `true` if the handler was removed, `false` if the handler didn't exist

#### getHandlerConfiguration

    HandlerConfiguration getHandlerConfiguration​(java.lang.String handlerName)

#### getHandlerNames

    java.util.List<java.lang.String> getHandlerNames()

#### addFormatterConfiguration

    FormatterConfiguration addFormatterConfiguration​(java.lang.String moduleName,
                                                     java.lang.String className,
                                                     java.lang.String formatterName,
                                                     java.lang.String... constructorProperties)

#### removeFormatterConfiguration

    boolean removeFormatterConfiguration​(java.lang.String formatterName)

#### getFormatterConfiguration

    FormatterConfiguration getFormatterConfiguration​(java.lang.String formatterName)

#### getFormatterNames

    java.util.List<java.lang.String> getFormatterNames()

#### addFilterConfiguration

    FilterConfiguration addFilterConfiguration​(java.lang.String moduleName,
                                               java.lang.String className,
                                               java.lang.String filterName,
                                               java.lang.String... constructorProperties)

#### removeFilterConfiguration

    boolean removeFilterConfiguration​(java.lang.String filterName)

#### getFilterConfiguration

    FilterConfiguration getFilterConfiguration​(java.lang.String filterName)

#### getFilterNames

    java.util.List<java.lang.String> getFilterNames()

#### addErrorManagerConfiguration

    ErrorManagerConfiguration addErrorManagerConfiguration​(java.lang.String moduleName,
                                                           java.lang.String className,
                                                           java.lang.String errorManagerName,
                                                           java.lang.String... constructorProperties)

#### removeErrorManagerConfiguration

    boolean removeErrorManagerConfiguration​(java.lang.String errorManagerName)

#### getErrorManagerConfiguration

    ErrorManagerConfiguration getErrorManagerConfiguration​(java.lang.String errorManagerName)

#### getErrorManagerNames

    java.util.List<java.lang.String> getErrorManagerNames()

#### prepare

    void prepare()

Prepares the current changes. The changes are applied into the running logging configuration, but can be rolled back using the `forget()` method if `commit()` has not been invoked.

#### addPojoConfiguration

    PojoConfiguration addPojoConfiguration​(java.lang.String moduleName,
                                           java.lang.String className,
                                           java.lang.String pojoName,
                                           java.lang.String... constructorProperties)

Add a POJO configuration.

Parameters:
  `moduleName` - the module name, or `null` to use the logmanager's class path
  `className` - the class name of the POJO (must not be `null`)
  `pojoName` - the name of the POJO (must be unique within this configuration and not `null`
  `constructorProperties` - an optional list of constructor property names
Returns:
  the new handler configuration

#### removePojoConfiguration

    boolean removePojoConfiguration​(java.lang.String pojoName)

Removes the POJO configuration.

Parameters:
  `pojoName` - the name of the POJO
Returns:
  `true` if the configuration was removed, othwerwise `false` if the configuration did not exist or was not remove.

#### getPojoConfiguration

    PojoConfiguration getPojoConfiguration​(java.lang.String pojoName)

Gets the POJO configuration.

Parameters:
  `pojoName` - the name of the POJO
Returns:
  the POJO configuration if found, otherwise `null`

#### getPojoNames

    java.util.List<java.lang.String> getPojoNames()

A list of the POJO configuration names.

Returns:
  a list of the names

#### commit

    void commit()

Commit the current changes into the running logging configuration.

#### forget

    void forget()

Clear all the current changes and restore this object to its original state.