psmith 2003/09/02 17:39:29 Modified: src/java/org/apache/log4j/chainsaw LogUI.java ChainsawAppenderHandler.java ChainsawEventBatchEntry.java ChainsawEventBatch.java Log: This is a checkpoint commit on the way to converting from the use of Vectors for event information, into native LoggingEvent objects. The ChainsawAppenderHandler now does no conversion of the incoming events, but bundles them up into batches and dispatches them to listeners, leaving it up to the listener to do any needed conversion as necessary. LogUI and LogPanel are now a little more decoupled. LogUI now has an inner helper class that is a batch listener that is there purely to listen for new pane identifiers and create new LogPanels as necessary. LogPanel now implements the event batch listener interface and gets added as listener on creation time and from that point on is responsible for receiving it's own events. At this point LogPanel still decodes/formats each LoggingEvent into a Vector as a final step, but that will change shortly-ish. Revision Changes Path 1.14 +221 -191 jakarta-log4j/src/java/org/apache/log4j/chainsaw/LogUI.java Index: LogUI.java =================================================================== RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/chainsaw/LogUI.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- LogUI.java 2 Sep 2003 06:32:06 -0000 1.13 +++ LogUI.java 3 Sep 2003 00:39:29 -0000 1.14 @@ -183,8 +183,7 @@ * @author Paul Smith <[EMAIL PROTECTED]> * */ -public class LogUI extends JFrame implements ChainsawViewer, SettingsListener, - EventBatchListener { +public class LogUI extends JFrame implements ChainsawViewer, SettingsListener { private static final String CONFIG_FILE_TO_USE = "config.file"; private static final String USE_CYCLIC_BUFFER_PROP_NAME = "chainsaw.usecyclicbuffer"; @@ -313,14 +312,14 @@ LogUI logUI = new LogUI(); logUI.handler = new ChainsawAppenderHandler(); - logUI.handler.addEventBatchListener(logUI); + logUI.handler.addEventBatchListener(logUI.new NewTabEventBatchReceiver()); LogManager.getRootLogger().addAppender(logUI.handler); logUI.activateViewer(); } public void activateViewer(ChainsawAppender appender) { handler = new ChainsawAppenderHandler(appender); - handler.addEventBatchListener(this); + handler.addEventBatchListener(new NewTabEventBatchReceiver()); activateViewer(); } @@ -943,7 +942,6 @@ } } - /** * Formats the individual elements of an LoggingEvent by ensuring that * there are no null bits, replacing them with EMPTY_STRING @@ -1003,183 +1001,6 @@ } /** - * Adds a specific row to a specific Tabbed Pane's TableModel. - * - * If there is currently no Tabbed Pane for the identifier, then a new - * one is created and added to this current Frames Tabbed Pane infrastructure - * @param ident - * @param v - */ - public void receiveEventBatch( - final String ident, final List eventBatchEntrys) { - if (eventBatchEntrys.size() == 0) { - return; - } - - EventContainer tableModel; - JSortTable table; - ScrollToBottom scrollToBottom; - HashMap map = null; - - if (!isGUIFullyInitialized) { - synchronized (initializationLock) { - while (!isGUIFullyInitialized) { - System.out.println( - "Wanting to add a row, but GUI not initialized, waiting..."); - - /** - * Lets wait 1 seconds and recheck. - */ - try { - initializationLock.wait(1000); - } catch (InterruptedException e) { - } - } - } - } - - if (tableModelMap.containsKey(ident)) { - tableModel = (EventContainer) tableModelMap.get(ident); - map = (HashMap) entryMap.get(ident); - scrollToBottom = (ScrollToBottom) scrollMap.get(ident); - table = (JSortTable) tableMap.get(ident); - } else { - final String eventType = - ((ChainsawEventBatchEntry) eventBatchEntrys.get(0)).getEventType(); - - int bufferSize = 500; - - //if buffer size not provided, set default buffer size to 500 (only used if usecyclicbuffer true) - if (System.getProperty(CYCLIC_BUFFER_SIZE_PROP_NAME) != null) { - bufferSize = - Integer.valueOf(System.getProperty(CYCLIC_BUFFER_SIZE_PROP_NAME)) - .intValue(); - } - - tableModel = - new ChainsawCyclicBufferTableModel( - Boolean.valueOf(System.getProperty(USE_CYCLIC_BUFFER_PROP_NAME)) - .booleanValue(), bufferSize); - - map = new HashMap(); - table = new JSortTable(tableModel); - table.getColumnModel().addColumnModelListener( - new ChainsawTableColumnModelListener(table)); - - table.setAutoCreateColumnsFromModel(false); - - table.setRowHeight(20); - table.setShowGrid(false); - - scrollToBottom = new ScrollToBottom(true); - - final LogPanel thisPanel = - new LogPanel(ident, tableModel, table, scrollToBottom, map, eventType); - - SwingUtilities.invokeLater( - new Runnable() { - public void run() { - tabbedPane.addANewTab( - ident, thisPanel, new ImageIcon(ChainsawIcons.TOOL_TIP)); - } - }); - - sm.configure(thisPanel); - - String msg = "added tab " + ident; - LogLog.debug(msg); - statusBar.setMessage(msg); - } - - table.getSelectionModel().setValueIsAdjusting(true); - - boolean rowAdded = false; - Vector lastSelected = null; - - if (table.getSelectedRow() > -1) { - lastSelected = tableModel.getRow(table.getSelectedRow()); - } - - for (Iterator iter = eventBatchEntrys.iterator(); iter.hasNext();) { - ChainsawEventBatchEntry entry = (ChainsawEventBatchEntry) iter.next(); - Vector v = formatFields(entry.getEventVector()); - final String eventType = entry.getEventType(); - String level = - v.get( - ChainsawColumns.getColumnsNames().indexOf( - ChainsawConstants.LEVEL_COL_NAME)).toString(); - - //add the level to the appropriate list if it didn't previously exist - if (!((List) levelMap.get(eventType)).contains(level)) { - ((List) levelMap.get(eventType)).add(level); - } - - //also add it to the unique values list - ((Set) map.get(ChainsawConstants.LEVEL_COL_NAME)).add(level); - - Object loggerName = - v.get( - ChainsawColumns.getColumnsNames().indexOf( - ChainsawConstants.LOGGER_COL_NAME)); - ((Set) map.get(ChainsawConstants.LOGGER_COL_NAME)).add(loggerName); - - /** - * EventContainer is a LoggerNameModel imp, use that for notifing - */ - tableModel.addLoggerName(loggerName.toString()); - - ((Set) map.get(ChainsawConstants.THREAD_COL_NAME)).add( - v.get( - ChainsawColumns.getColumnsNames().indexOf( - ChainsawConstants.THREAD_COL_NAME))); - ((Set) map.get(ChainsawConstants.NDC_COL_NAME)).add( - v.get( - ChainsawColumns.getColumnsNames().indexOf( - ChainsawConstants.NDC_COL_NAME))); - ((Set) map.get(ChainsawConstants.MDC_COL_NAME)).add( - v.get( - ChainsawColumns.getColumnsNames().indexOf( - ChainsawConstants.MDC_COL_NAME))); - ((Set) map.get(ChainsawConstants.CLASS_COL_NAME)).add( - v.get( - ChainsawColumns.getColumnsNames().indexOf( - ChainsawConstants.CLASS_COL_NAME))); - ((Set) map.get(ChainsawConstants.METHOD_COL_NAME)).add( - v.get( - ChainsawColumns.getColumnsNames().indexOf( - ChainsawConstants.METHOD_COL_NAME))); - ((Set) map.get(ChainsawConstants.FILE_COL_NAME)).add( - v.get( - ChainsawColumns.getColumnsNames().indexOf( - ChainsawConstants.FILE_COL_NAME))); - - boolean isCurrentRowAdded = tableModel.isAddRow(v, true); - rowAdded = rowAdded ? true : isCurrentRowAdded; - statusBar.receivedEvent(); - } - - table.getSelectionModel().setValueIsAdjusting(false); - - //tell the model to notify the count listeners - tableModel.notifyCountListeners(); - - if (rowAdded) { - tableModel.sort(); - - if (scrollToBottom.isScrolled() && !scrollToBottom.isBypassed()) { - table.scrollToBottom( - table.columnAtPoint(table.getVisibleRect().getLocation())); - } else { - if (lastSelected != null) { - table.scrollToRow( - tableModel.getRowIndex(lastSelected), - table.columnAtPoint(table.getVisibleRect().getLocation())); - } - } - } - } - - /** * Modify the saved Look And Feel - does not update the currently used Look And Feel * @param string The FQN of the LookAndFeel */ @@ -1239,12 +1060,94 @@ } /** + * This class handles the recption of the Event batches + * and creates new LogPanels if the identifier is not in use + * otherwise it ignores the event batch. + * @author Paul Smith <[EMAIL PROTECTED]> + * + */ + private class NewTabEventBatchReceiver implements EventBatchListener { + public void receiveEventBatch( + final String ident, final List eventBatchEntrys) { + if (eventBatchEntrys.size() == 0) { + return; + } + + EventContainer tableModel; + JSortTable table; + ScrollToBottom scrollToBottom; + HashMap map = null; + + if (!isGUIFullyInitialized) { + synchronized (initializationLock) { + while (!isGUIFullyInitialized) { + System.out.println( + "Wanting to add a row, but GUI not initialized, waiting..."); + + /** + * Lets wait 1 seconds and recheck. + */ + try { + initializationLock.wait(1000); + } catch (InterruptedException e) { + } + } + } + } + + if (tableModelMap.containsKey(ident)) { + /** + * we ignore this since we assume the LogPanel has been registered itself a listener + * and will receive it's own event batches directly + */ + } else { + final String eventType = + ((ChainsawEventBatchEntry) eventBatchEntrys.get(0)).getEventType(); + final LogPanel thisPanel = new LogPanel(ident, eventType); + + /** + * Let the new LogPanel receive this batch + */ + thisPanel.receiveEventBatch(ident, eventBatchEntrys); + + /** + * Now add the panel as a batch listener so it can handle it's own batchs + */ + handler.addEventBatchListener(thisPanel); + + SwingUtilities.invokeLater( + new Runnable() { + public void run() { + tabbedPane.addANewTab( + ident, thisPanel, new ImageIcon(ChainsawIcons.TOOL_TIP)); + } + }); + + sm.configure(thisPanel); + + String msg = "added tab " + ident; + LogLog.debug(msg); + statusBar.setMessage(msg); + } + } + + /* (non-Javadoc) + * @see org.apache.log4j.chainsaw.EventBatchListener#getInterestedIdentifier() + */ + public String getInterestedIdentifier() { + // we are interested in all batches so we can detect new identifiers + return null; + } + } + + /** * LogPanel encapsulates all the necessary bits and pieces of a * floating window of Events coming from a specific Location. * * This is where most of the Swing components are constructed and laid out. */ - class LogPanel extends DockablePanel implements SettingsListener { + class LogPanel extends DockablePanel implements SettingsListener, + EventBatchListener { final ColorFilter colorFilter = new ColorFilter(); final DisplayFilter displayFilter; final EventContainer tableModel; @@ -1281,19 +1184,43 @@ private final JSplitPane nameTreeAndMainPanelSplit; private final LoggerNameTreePanel logTreePanel; - public LogPanel( - final String ident, final EventContainer tableModel, - final JSortTable table, final ScrollToBottom scrollToBottom, - final Map map, String eventType) { + public LogPanel(final String ident, String eventType) { identifier = ident; - this.scrollToBottom = scrollToBottom; - this.tableModel = tableModel; - this.table = table; + Map map = new HashMap(); + entryMap.put(ident, map); + + int bufferSize = 500; + + //if buffer size not provided, set default buffer size to 500 (only used if usecyclicbuffer true) + if (System.getProperty(CYCLIC_BUFFER_SIZE_PROP_NAME) != null) { + bufferSize = + Integer.valueOf(System.getProperty(CYCLIC_BUFFER_SIZE_PROP_NAME)) + .intValue(); + } + + tableModel = + new ChainsawCyclicBufferTableModel( + Boolean.valueOf(System.getProperty(USE_CYCLIC_BUFFER_PROP_NAME)) + .booleanValue(), bufferSize); + + table = new JSortTable(tableModel); + table.getColumnModel().addColumnModelListener( + new ChainsawTableColumnModelListener(table)); + + table.setAutoCreateColumnsFromModel(false); + + table.setRowHeight(20); + table.setShowGrid(false); + + scrollToBottom = new ScrollToBottom(true); + + // ========================================== tableModel.addLoggerNameListener(logTreeModel); logTreePanel = new LoggerNameTreePanel(logTreeModel); levelSet = new HashSet((List) levelMap.get(eventType)); + map.put(ChainsawConstants.LEVEL_COL_NAME, levelSet); map.put(ChainsawConstants.LOGGER_COL_NAME, loggerSet); @@ -1906,7 +1833,6 @@ tableModelMap.put(ident, tableModel); tabbedPane.add(ident, this); panelMap.put(ident, this); - entryMap.put(ident, map); tableModel.addEventCountListener( new EventCountListener() { @@ -2304,6 +2230,110 @@ */ public boolean isLogTreePanelVisible() { return logTreePanel.isVisible(); + } + + /* (non-Javadoc) + * @see org.apache.log4j.chainsaw.EventBatchListener#getInterestedIdentifier() + */ + public String getInterestedIdentifier() { + // TODO Auto-generated method stub + return null; + } + + /* (non-Javadoc) + * @see org.apache.log4j.chainsaw.EventBatchListener#receiveEventBatch(java.lang.String, java.util.List) + */ + public void receiveEventBatch(String identifier, List eventBatchEntrys) { + table.getSelectionModel().setValueIsAdjusting(true); + + boolean rowAdded = false; + Vector lastSelected = null; + + if (table.getSelectedRow() > -1) { + lastSelected = tableModel.getRow(table.getSelectedRow()); + } + + for (Iterator iter = eventBatchEntrys.iterator(); iter.hasNext();) { + ChainsawEventBatchEntry entry = (ChainsawEventBatchEntry) iter.next(); + + Vector v = formatFields(entry.getEventVector()); + + final String eventType = entry.getEventType(); + String level = + v.get( + ChainsawColumns.getColumnsNames().indexOf( + ChainsawConstants.LEVEL_COL_NAME)).toString(); + + //add the level to the appropriate list if it didn't previously exist + if (!((List) levelMap.get(eventType)).contains(level)) { + ((List) levelMap.get(eventType)).add(level); + } + + Map map = (HashMap) entryMap.get(getIdentifier()); + + //also add it to the unique values list + ((Set) map.get(ChainsawConstants.LEVEL_COL_NAME)).add(level); + + Object loggerName = + v.get( + ChainsawColumns.getColumnsNames().indexOf( + ChainsawConstants.LOGGER_COL_NAME)); + ((Set) map.get(ChainsawConstants.LOGGER_COL_NAME)).add(loggerName); + + /** + * EventContainer is a LoggerNameModel imp, use that for notifing + */ + tableModel.addLoggerName(loggerName.toString()); + + ((Set) map.get(ChainsawConstants.THREAD_COL_NAME)).add( + v.get( + ChainsawColumns.getColumnsNames().indexOf( + ChainsawConstants.THREAD_COL_NAME))); + ((Set) map.get(ChainsawConstants.NDC_COL_NAME)).add( + v.get( + ChainsawColumns.getColumnsNames().indexOf( + ChainsawConstants.NDC_COL_NAME))); + ((Set) map.get(ChainsawConstants.MDC_COL_NAME)).add( + v.get( + ChainsawColumns.getColumnsNames().indexOf( + ChainsawConstants.MDC_COL_NAME))); + ((Set) map.get(ChainsawConstants.CLASS_COL_NAME)).add( + v.get( + ChainsawColumns.getColumnsNames().indexOf( + ChainsawConstants.CLASS_COL_NAME))); + ((Set) map.get(ChainsawConstants.METHOD_COL_NAME)).add( + v.get( + ChainsawColumns.getColumnsNames().indexOf( + ChainsawConstants.METHOD_COL_NAME))); + ((Set) map.get(ChainsawConstants.FILE_COL_NAME)).add( + v.get( + ChainsawColumns.getColumnsNames().indexOf( + ChainsawConstants.FILE_COL_NAME))); + + boolean isCurrentRowAdded = tableModel.isAddRow(v, true); + rowAdded = rowAdded ? true : isCurrentRowAdded; + statusBar.receivedEvent(); + } + + table.getSelectionModel().setValueIsAdjusting(false); + + //tell the model to notify the count listeners + tableModel.notifyCountListeners(); + + if (rowAdded) { + tableModel.sort(); + + if (scrollToBottom.isScrolled() && !scrollToBottom.isBypassed()) { + table.scrollToBottom( + table.columnAtPoint(table.getVisibleRect().getLocation())); + } else { + if (lastSelected != null) { + table.scrollToRow( + tableModel.getRowIndex(lastSelected), + table.columnAtPoint(table.getVisibleRect().getLocation())); + } + } + } } } 1.3 +48 -73 jakarta-log4j/src/java/org/apache/log4j/chainsaw/ChainsawAppenderHandler.java Index: ChainsawAppenderHandler.java =================================================================== RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/chainsaw/ChainsawAppenderHandler.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ChainsawAppenderHandler.java 2 Sep 2003 06:32:06 -0000 1.2 +++ ChainsawAppenderHandler.java 3 Sep 2003 00:39:29 -0000 1.3 @@ -50,6 +50,10 @@ package org.apache.log4j.chainsaw; import org.apache.log4j.AppenderSkeleton; +import org.apache.log4j.LogManager; +import org.apache.log4j.helpers.LogLog; +import org.apache.log4j.net.SocketReceiver; +import org.apache.log4j.plugins.PluginRegistry; import org.apache.log4j.spi.LocationInfo; import org.apache.log4j.spi.LoggingEvent; @@ -129,8 +133,10 @@ * Converts a LoggingEvent into a Vector of element (columns really). * @param event * @return + * + * @deprecated */ - private Vector convert(LoggingEvent event) { + static Vector convert(LoggingEvent event) { Vector v = new Vector(); LocationInfo info = event.getLocationInformation(); String className = ""; @@ -228,66 +234,16 @@ * @param v * @return */ - private static String getTabIdentifier(Vector v) { - int fieldIndex = - ChainsawColumns.getColumnsNames().indexOf( - ChainsawConstants.PROPERTIES_COL_NAME); - - if (fieldIndex < 0) { - return ChainsawConstants.UNKNOWN_TAB_NAME; - } - - String properties = (String) v.get(fieldIndex); - - String machinekey = ChainsawConstants.LOG4J_MACHINE_KEY + "="; - String machinename = null; - int machineposition = properties.indexOf(machinekey) + machinekey.length(); - int machinelength = properties.indexOf(",", machineposition); - - if (machinelength == -1) { - machinelength = properties.length(); - } - - if (machineposition >= machinekey.length()) { - machinename = properties.substring(machineposition, machinelength); - - int dotposition = machinename.indexOf("."); - boolean isnumeric = true; - - if (dotposition > -1) { - char[] firstdotpart = - machinename.substring(0, dotposition).toCharArray(); - - for (int i = 0; i < firstdotpart.length; i++) { - isnumeric = isnumeric && Character.isDigit(firstdotpart[i]); - } - - if (!isnumeric) { - machinename = machinename.substring(0, dotposition); - } - } - } - - String appkey = ChainsawConstants.LOG4J_APP_KEY + "="; - String appname = null; - int appposition = properties.indexOf(appkey) + appkey.length(); - - if (appposition >= appkey.length()) { - int applength = properties.indexOf(",", appposition); - - if (applength == -1) { - applength = properties.length(); - } - - appname = properties.substring(appposition, applength); - } - + private static String getTabIdentifier(LoggingEvent e) { StringBuffer ident = new StringBuffer(); + String machinename = e.getProperty(ChainsawConstants.LOG4J_MACHINE_KEY); if (machinename != null) { ident.append(machinename); } + String appname = e.getProperty(ChainsawConstants.LOG4J_APP_KEY); + if (appname != null) { ident.append("-"); ident.append(appname); @@ -297,20 +253,15 @@ /** * Maybe there's a Remote Host entry? */ - String remoteHostKey = ChainsawConstants.LOG4J_REMOTEHOST_KEY + "="; - String remoteHost = null; - int rhposition = - properties.indexOf(remoteHostKey) + remoteHostKey.length(); - - if (rhposition >= remoteHostKey.length()) { - int rhlength = properties.indexOf(":", rhposition); - - if (rhlength == -1) { - rhlength = properties.length(); - } - - remoteHost = properties.substring(rhposition, rhlength); - } + String remoteHost = e.getProperty(ChainsawConstants.LOG4J_REMOTEHOST_KEY); +// int rhlength = remoteHost.indexOf(":"); +// +// if (rhlength == -1) { +// rhlength = properties.length(); +// } +// +// remoteHost = properties.substring(rhposition, rhlength); +// } if (remoteHost != null) { ident.append(remoteHost); @@ -388,14 +339,12 @@ eventType = ChainsawConstants.LOG4J_EVENT_TYPE; } - Vector convertedEventVector = convert(e); - String ident = getTabIdentifier(convertedEventVector); - eventBatch.addEvent(ident, eventType, convertedEventVector); + String ident = getTabIdentifier(e); + eventBatch.addEvent(ident, eventType, e); } dispatchEventBatch(eventBatch); - // logUI.receiveEventBatch(eventBatch); innerList.clear(); } @@ -440,4 +389,30 @@ } } } + + /** + * A little test bed + * @param args + */ + public static void main(String[] args) throws InterruptedException { + + ChainsawAppenderHandler handler = new ChainsawAppenderHandler(); + handler.addEventBatchListener(new EventBatchListener() { + + public String getInterestedIdentifier() { + return null; + } + + public void receiveEventBatch(String identifier, List eventBatchEntrys) { + LogLog.debug("received batch for '" + identifier + "', list.size()=" + eventBatchEntrys.size()); + LogLog.debug(eventBatchEntrys.toString()); + + }}); + LogManager.getRootLogger().addAppender(handler); + + SocketReceiver receiver = new SocketReceiver(4445); + PluginRegistry.startPlugin(receiver); + + Thread.sleep(60000); +} } 1.2 +34 -5 jakarta-log4j/src/java/org/apache/log4j/chainsaw/ChainsawEventBatchEntry.java Index: ChainsawEventBatchEntry.java =================================================================== RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/chainsaw/ChainsawEventBatchEntry.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ChainsawEventBatchEntry.java 2 Sep 2003 06:26:48 -0000 1.1 +++ ChainsawEventBatchEntry.java 3 Sep 2003 00:39:29 -0000 1.2 @@ -55,6 +55,8 @@ */ package org.apache.log4j.chainsaw; +import org.apache.log4j.spi.LoggingEvent; + import java.util.Vector; @@ -65,25 +67,52 @@ */ class ChainsawEventBatchEntry { private String eventType; - private Vector eventVector; + + // private Vector eventVector; + private LoggingEvent event; private String identifier; - ChainsawEventBatchEntry( - String identifier, String eventType, Vector eventVector) { + ChainsawEventBatchEntry(String identifier, String eventType, LoggingEvent e) { this.identifier = identifier; this.eventType = eventType; - this.eventVector = eventVector; + this.event = e; } String getEventType() { return eventType; } + /** + * @deprecated + * @return + */ Vector getEventVector() { - return eventVector; + return ChainsawAppenderHandler.convert(getEvent()); +// throw new UnsupportedOperationException( +// "Transistion to non Vector based model"); + + // return eventVector; + } + + public LoggingEvent getEvent() { + return event; } public String getIdentifier() { return identifier; + } + + public String toString() + { + StringBuffer buffer = new StringBuffer(this.getClass().getName()); + buffer.append("["); + buffer.append("ident=").append(getIdentifier()); + buffer.append(","); + buffer.append("eventType=").append(getEventType()); + buffer.append(","); + buffer.append("event=").append(getEvent()); + buffer.append("]"); + + return buffer.toString(); } } 1.3 +4 -2 jakarta-log4j/src/java/org/apache/log4j/chainsaw/ChainsawEventBatch.java Index: ChainsawEventBatch.java =================================================================== RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/chainsaw/ChainsawEventBatch.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ChainsawEventBatch.java 2 Sep 2003 06:26:48 -0000 1.2 +++ ChainsawEventBatch.java 3 Sep 2003 00:39:29 -0000 1.3 @@ -56,6 +56,8 @@ import java.util.Map; import java.util.Vector; +import org.apache.log4j.spi.LoggingEvent; + /** * A container class that contains a group of events split up @@ -74,7 +76,7 @@ * @param eventType * @param convertedEventVector */ - void addEvent(String ident, String eventType, Vector convertedEventVector) { + void addEvent(String ident, String eventType, LoggingEvent e) { List events = null; if (!identEventMap.containsKey(ident)) { @@ -85,7 +87,7 @@ } events.add( - new ChainsawEventBatchEntry(ident, eventType, convertedEventVector)); + new ChainsawEventBatchEntry(ident, eventType, e)); } /**
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]