cz.cuni.amis.nb.pogamut.base.logging
Class LogProxy

Package class diagram package LogProxy
java.lang.Object
  extended by cz.cuni.amis.nb.pogamut.base.logging.LogRecordsSource<LogRecord>
      extended by cz.cuni.amis.nb.pogamut.base.logging.LogProxy

public class LogProxy
extends LogRecordsSource<LogRecord>

Adapter of standard Java logger to LogRecordsSource object. This class also provides property sheet for GUI.

Author:
ik

Nested Class Summary
protected  class LogProxy.FilterLog
          Filter for log records.
 
Nested classes/interfaces inherited from class cz.cuni.amis.nb.pogamut.base.logging.LogRecordsSource
LogRecordsSource.Filter<T>, LogRecordsSource.RegexpFilter<T>
 
Field Summary
protected  Handler handler
          Log handler.
protected static String[] levelNames
          Names of log levels.
protected static Level[] levels
          Array of all standard log levels.
protected static Map<Level,Integer> levelToIndex
          Mapping between log level identifiers and their indexes in levelNames array.
protected static int[] levelVals
          Values of log level constants, indexes correspond to levels array.
 
Fields inherited from class cz.cuni.amis.nb.pogamut.base.logging.LogRecordsSource
filters, listeners, queue
 
Constructor Summary
LogProxy(Logger log)
          Creates a new instance of LogProxy
 
Method Summary
protected  LogRecord getLogRecParam(LogRecord lr)
           
 org.openide.nodes.Sheet.Set getPropSet()
          Returns property sheet associated with node representing this source.
 void setRegexpFilterPatter(Pattern pattern)
          Sets new pattern for regexp filter.
protected  LogRecord toLogRecord(LogRecord t)
          Pass the log record to the ancestor (LogRecordSource).
 
Methods inherited from class cz.cuni.amis.nb.pogamut.base.logging.LogRecordsSource
addFilter, addLogRecordListener, addMessage, clear, filter, getFilteredData, notifyLogRecordsListeners, notifySetNewData, notifySetNewData, removeFilter, removeLogRecordListener, replaceFilter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

levelNames

protected static String[] levelNames
Names of log levels.


levelVals

protected static int[] levelVals
Values of log level constants, indexes correspond to levels array.


levels

protected static Level[] levels
Array of all standard log levels.


levelToIndex

protected static Map<Level,Integer> levelToIndex
Mapping between log level identifiers and their indexes in levelNames array.


handler

protected Handler handler
Log handler.

Constructor Detail

LogProxy

public LogProxy(Logger log)
Creates a new instance of LogProxy

Parameters:
log - Logger to be adapted by this LogProxy.
Method Detail

setRegexpFilterPatter

public void setRegexpFilterPatter(Pattern pattern)
Sets new pattern for regexp filter.

Overrides:
setRegexpFilterPatter in class LogRecordsSource<LogRecord>

getPropSet

public org.openide.nodes.Sheet.Set getPropSet()
Description copied from class: LogRecordsSource
Returns property sheet associated with node representing this source. TODO move it to the node?

Overrides:
getPropSet in class LogRecordsSource<LogRecord>
Returns:
property sheet associated with node representing this source.

toLogRecord

protected LogRecord toLogRecord(LogRecord t)
Pass the log record to the ancestor (LogRecordSource).

Specified by:
toLogRecord in class LogRecordsSource<LogRecord>

getLogRecParam

protected LogRecord getLogRecParam(LogRecord lr)
Overrides:
getLogRecParam in class LogRecordsSource<LogRecord>
Returns:
parameter of given log record


Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.