org.esa.beam.util.logging
Class ExceptionCollector

java.lang.Object
  extended by java.util.logging.Handler
      extended by org.esa.beam.util.logging.ExceptionCollector

public class ExceptionCollector
extends Handler

This handler collects all exceptions logged by the system logger. It can be added to the Logger by using the addhandler(Handler) method.

Author:
Marco Peters, Andrea Sabine Embacher

Constructor Summary
ExceptionCollector()
           
 
Method Summary
 void close()
           
 void flush()
           
 LogRecord[] getExceptions()
          Gets all logged Exceptions and clears the storage.
 void publish(LogRecord record)
           
 
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionCollector

public ExceptionCollector()
Method Detail

close

public void close()
           throws SecurityException
Specified by:
close in class Handler
Throws:
SecurityException

flush

public void flush()
Specified by:
flush in class Handler

publish

public void publish(LogRecord record)
Specified by:
publish in class Handler

getExceptions

public LogRecord[] getExceptions()
Gets all logged Exceptions and clears the storage.

Returns:
Array of LogRecords.


Copyright © 2002-2012 Brockmann Consult GmbH. All Rights Reserved.