Author: rob.stryker(a)jboss.com
Date: 2008-02-22 17:15:30 -0500 (Fri, 22 Feb 2008)
New Revision: 6545
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ModelChangeListener.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchivesLogger.java
Log:
fleshing logger api a bit
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ModelChangeListener.java
===================================================================
---
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ModelChangeListener.java 2008-02-22
21:32:52 UTC (rev 6544)
+++
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ModelChangeListener.java 2008-02-22
22:15:30 UTC (rev 6545)
@@ -1,6 +1,26 @@
+/**
+ * JBoss, a Division of Red Hat
+ * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+* This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package org.jboss.ide.eclipse.archives.core.build;
-
import org.eclipse.core.runtime.IPath;
import org.jboss.ide.eclipse.archives.core.ArchivesCore;
import org.jboss.ide.eclipse.archives.core.model.EventManager;
@@ -11,6 +31,7 @@
import org.jboss.ide.eclipse.archives.core.model.IArchiveModelNode;
import org.jboss.ide.eclipse.archives.core.model.IArchiveNode;
import org.jboss.ide.eclipse.archives.core.model.IArchiveNodeDelta;
+import org.jboss.ide.eclipse.archives.core.model.IArchivesLogger;
import org.jboss.ide.eclipse.archives.core.util.ModelUtil;
import org.jboss.ide.eclipse.archives.core.util.internal.ModelTruezipBridge;
@@ -40,7 +61,7 @@
try {
handle(delta);
} catch( Exception e ) {
- e.printStackTrace();
+ ArchivesCore.getInstance().getLogger().log(IArchivesLogger.MSG_ERR, "Error
updating model changes", e);
}
}
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchivesLogger.java
===================================================================
---
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchivesLogger.java 2008-02-22
21:32:52 UTC (rev 6544)
+++
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchivesLogger.java 2008-02-22
22:15:30 UTC (rev 6545)
@@ -26,5 +26,22 @@
*
*/
public interface IArchivesLogger {
- public void log(int severety, String message,Throwable ise);
+ /** Message priority of "error". */
+ public static final int MSG_ERR = 0;
+ /** Message priority of "warning". */
+ public static final int MSG_WARN = 1;
+ /** Message priority of "information". */
+ public static final int MSG_INFO = 2;
+ /** Message priority of "verbose". */
+ public static final int MSG_VERBOSE = 3;
+ /** Message priority of "debug". */
+ public static final int MSG_DEBUG = 4;
+
+ /**
+ * Log a message
+ * @param severety
+ * @param message
+ * @param error
+ */
+ public void log(int severety, String message,Throwable throwable);
}