Author: adietish
Date: 2010-10-15 07:51:27 -0400 (Fri, 15 Oct 2010)
New Revision: 25860
Modified:
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/http/HttpGetRequest.java
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/tracker/ILoggingAdapter.java
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/tracker/internal/PluginLogger.java
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/tracker/internal/Tracker.java
Log:
[JBIDE-7320] changed API to conform to log4j signature
Modified:
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/http/HttpGetRequest.java
===================================================================
---
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/http/HttpGetRequest.java 2010-10-15
11:28:19 UTC (rev 25859)
+++
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/http/HttpGetRequest.java 2010-10-15
11:51:27 UTC (rev 25860)
@@ -53,12 +53,12 @@
urlConnection.connect();
int responseCode = getResponseCode(urlConnection);
if (responseCode == HttpURLConnection.HTTP_OK) {
- loggingAdapter.logMessage(MessageFormat.format(HttpMessages.HttpGetMethod_Success,
urlString, responseCode));
+ loggingAdapter.debug(MessageFormat.format(HttpMessages.HttpGetMethod_Success,
urlString, responseCode));
} else {
- loggingAdapter.logError(MessageFormat.format(HttpMessages.HttpGetMethod_Error_Http,
urlString));
+ loggingAdapter.error(MessageFormat.format(HttpMessages.HttpGetMethod_Error_Http,
urlString));
}
} catch (Exception e) {
- loggingAdapter.logMessage(MessageFormat.format(HttpMessages.HttpGetMethod_Error_Io,
urlString, e.toString()));
+ loggingAdapter.debug(MessageFormat.format(HttpMessages.HttpGetMethod_Error_Io,
urlString, e.toString()));
} finally {
// setCookieHandler(currentCookieHandler);
}
Modified:
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/tracker/ILoggingAdapter.java
===================================================================
---
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/tracker/ILoggingAdapter.java 2010-10-15
11:28:19 UTC (rev 25859)
+++
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/tracker/ILoggingAdapter.java 2010-10-15
11:51:27 UTC (rev 25860)
@@ -15,8 +15,8 @@
*/
public interface ILoggingAdapter {
- public void logError(String errorMessage);
+ public void error(String errorMessage);
- public void logMessage(String message);
+ public void debug(String message);
}
Modified:
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/tracker/internal/PluginLogger.java
===================================================================
---
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/tracker/internal/PluginLogger.java 2010-10-15
11:28:19 UTC (rev 25859)
+++
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/tracker/internal/PluginLogger.java 2010-10-15
11:51:27 UTC (rev 25860)
@@ -30,11 +30,11 @@
this.plugin = plugin;
}
- public void logError(String message) {
+ public void error(String message) {
log(IStatus.ERROR, message);
}
- public void logMessage(String message) {
+ public void debug(String message) {
log(IStatus.INFO, message);
}
Modified:
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/tracker/internal/Tracker.java
===================================================================
---
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/tracker/internal/Tracker.java 2010-10-15
11:28:19 UTC (rev 25859)
+++
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/tracker/internal/Tracker.java 2010-10-15
11:51:27 UTC (rev 25860)
@@ -41,11 +41,11 @@
public void trackSynchronously(IFocusPoint focusPoint) {
loggingAdapter
- .logMessage(MessageFormat.format(TrackerMessages.Tracker_Synchronous,
focusPoint.getTitle()));
+ .debug(MessageFormat.format(TrackerMessages.Tracker_Synchronous,
focusPoint.getTitle()));
try {
httpRequest.request(getTrackingUrl(focusPoint));
} catch (Exception e) {
- loggingAdapter.logError(MessageFormat.format(TrackerMessages.Tracker_Error,
e.getMessage()));
+ loggingAdapter.error(MessageFormat.format(TrackerMessages.Tracker_Error,
e.getMessage()));
}
}
@@ -54,7 +54,7 @@
}
public void trackAsynchronously(IFocusPoint focusPoint) {
- loggingAdapter.logMessage(MessageFormat
+ loggingAdapter.debug(MessageFormat
.format(TrackerMessages.Tracker_Asynchronous, focusPoint.getTitle()));
new Thread(new TrackingRunnable(focusPoint)).start();
}
@@ -70,7 +70,7 @@
try {
httpRequest.request(getTrackingUrl(focusPoint));
} catch (Exception e) {
- loggingAdapter.logError(MessageFormat.format(TrackerMessages.Tracker_Error,
e.getMessage()));
+ loggingAdapter.error(MessageFormat.format(TrackerMessages.Tracker_Error,
e.getMessage()));
}
}
}
Show replies by date