Skip to content

Commit

Permalink
fix: log in error instead of warn
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierMary committed Mar 8, 2023
1 parent 103da34 commit a3530ee
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group 'fr.mary.olivier'
version '2.0.7'
version '2.0.8'

repositories {
mavenCentral()
Expand Down Expand Up @@ -83,6 +83,8 @@ intellij {
}
patchPluginXml {
setChangeNotes """
2.0.8<br>
- Fix logs errors instead of warn<br>
2.0.7<br>
- OkHttp3 upgrade<br>
2.0.6<br>
Expand Down
20 changes: 10 additions & 10 deletions src/main/java/fr/mary/olivier/aw/watcher/ReportActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public static void sendHeartBeat(VirtualFile file, Project project) {
API_CLIENT.postHeartbeatResourceAsync(bucket.getId(), event, "" + HEARTBEAT_PULSETIME, new ApiCallback<>() {
@Override
public void onFailure(ApiException e, int statusCode, Map<String, List<String>> responseHeaders) {
LOG.error("Unable to send heartbeat", e);
LOG.warn("Unable to send heartbeat:", e);
ReportActivity.connexionLost();
}

Expand All @@ -141,7 +141,7 @@ public void onDownloadProgress(long bytesRead, long contentLength, boolean done)
}
});
} catch (Exception e) {
LOG.error("Unable to send heartbeat", e);
LOG.warn("Unable to send heartbeat:", e);
ReportActivity.connexionLost();
}
}
Expand All @@ -153,7 +153,7 @@ private static void initBucket() {
try {
hostname = InetAddress.getLocalHost().getHostName();
} catch (Exception exp) {
LOG.error("Unable to get hostname", exp);
LOG.warn("Unable to get hostname:", exp);
hostname = "unknown";
}

Expand Down Expand Up @@ -192,7 +192,7 @@ public void onSuccess(Bucket result, int statusCode, Map<String, List<String>> r

@Override
public void onFailure(ApiException e, int statusCode, Map<String, List<String>> responseHeaders) {
LOG.error("Unable to init bucket", e);
LOG.warn("Unable to init bucket:", e);
connexionLost = true;
}

Expand All @@ -208,13 +208,13 @@ public void onDownloadProgress(long bytesRead, long contentLength, boolean done)
}
});
} catch (ApiException ex) {
LOG.error("Unable to init bucket", ex);
LOG.warn("Unable to init bucket:", ex);
}
}

@Override
public void onFailure(ApiException e, int statusCode, Map<String, List<String>> responseHeaders) {
LOG.error("Unable to create bucket", e);
LOG.warn("Unable to create bucket:", e);
initialCheckDone = true;
}

Expand All @@ -231,7 +231,7 @@ public void onDownloadProgress(long bytesRead, long contentLength, boolean done)

);
} catch (Exception expB) {
LOG.error("Unable to create bucket", expB);
LOG.warn("Unable to create bucket:", expB);
initialCheckDone = true;
}
}
Expand All @@ -248,7 +248,7 @@ public void onDownloadProgress(long bytesRead, long contentLength, boolean done)
}
});
} catch (Exception exp) {
LOG.error("Unable to init bucket", exp);
LOG.warn("Unable to init bucket:", exp);
connexionLost = true;
}
}
Expand Down Expand Up @@ -282,12 +282,12 @@ public void dispose() {
try {
connection.disconnect();
} catch (Exception e) {
LOG.error("Unable to disconnect to message bus", e);
LOG.warn("Unable to disconnect to message bus:", e);
}
try {
scheduledConnexion.cancel(true);
} catch (Exception e) {
LOG.error("Unable to cancel schedulers", e);
LOG.warn("Unable to cancel schedulers:", e);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<id>fr.mary.olivier.aw-watcher</id>
<name>Activity Watcher</name>
<vendor email="[email protected]" url="https://github.com/OlivierMary">OlivierMARY</vendor>
<version>2.0.7</version>
<version>2.0.8</version>

<description><![CDATA[
This extension allows the open source tracking tool ActivityWatch to keep track of the projects and coding languages you use in jetbrains IDEs.
Expand Down

0 comments on commit a3530ee

Please sign in to comment.