JBoss Log Manager 1.3.2.Final-redhat-1

org.jboss.logmanager
Class PropertyConfigurator

java.lang.Object
  extended by org.jboss.logmanager.PropertyConfigurator
All Implemented Interfaces:
Configurator

public final class PropertyConfigurator
extends Object
implements Configurator

A configurator which uses a simple property file format.


Field Summary
 
Fields inherited from interface org.jboss.logmanager.Configurator
ATTACHMENT_KEY
 
Constructor Summary
PropertyConfigurator()
          Construct an instance.
PropertyConfigurator(LogContext context)
          Construct a new instance.
 
Method Summary
 void configure(InputStream inputStream)
          Configure the logmanager.
 void configure(Properties properties)
          Configure the log manager from the given properties.
 LogContextConfiguration getLogContextConfiguration()
          Get the log context configuration.
 void writeConfiguration(OutputStream outputStream)
          Writes the current configuration to the output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyConfigurator

public PropertyConfigurator()
Construct an instance.


PropertyConfigurator

public PropertyConfigurator(LogContext context)
Construct a new instance.

Parameters:
context - the log context to be configured
Method Detail

getLogContextConfiguration

public LogContextConfiguration getLogContextConfiguration()
Get the log context configuration. WARNING: this instance is not thread safe in any way. The returned object should never be used from more than one thread at a time; furthermore the writeConfiguration(java.io.OutputStream) method also accesses this object directly.

Returns:
the log context configuration instance

configure

public void configure(InputStream inputStream)
               throws IOException
Configure the logmanager.

Specified by:
configure in interface Configurator
Parameters:
inputStream - the input stream to read
Throws:
IOException - if an error occurs

writeConfiguration

public void writeConfiguration(OutputStream outputStream)
                        throws IOException
Writes the current configuration to the output stream. Note: the output stream will be closed.

Parameters:
outputStream - the output stream to write to.
Throws:
IOException - if an error occurs while writing the configuration.

configure

public void configure(Properties properties)
               throws IOException
Configure the log manager from the given properties.

Parameters:
properties - the properties
Throws:
IOException - if an error occurs

JBoss Log Manager 1.3.2.Final-redhat-1

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.