From 422641ab1ddcdb9084f9bd21a6cde62c6d04e360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rg=20Prante?= Date: Fri, 20 Mar 2020 14:19:05 +0100 Subject: [PATCH] changes for journal entry --- gradle/wrapper/gradle-wrapper.properties | 4 ++-- gradlew | 6 +++--- gradlew.bat | 2 +- src/main/java/org/xbib/systemd/DefaultJournalEntry.java | 7 +------ src/main/java/org/xbib/systemd/SystemdJournalConsumer.java | 3 --- 5 files changed, 7 insertions(+), 15 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 461f646..58879c5 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ -#Mon Jul 29 11:55:05 CEST 2019 -distributionUrl=https\://services.gradle.org/distributions/gradle-5.3.1-all.zip +#Thu Mar 19 17:07:57 CET 2020 +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index b0d6d0a..83f2acf 100755 --- a/gradlew +++ b/gradlew @@ -7,7 +7,7 @@ # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -125,8 +125,8 @@ if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` JAVACMD=`cygpath --unix "$JAVACMD"` diff --git a/gradlew.bat b/gradlew.bat index 15e1ee3..24467a1 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -5,7 +5,7 @@ @rem you may not use this file except in compliance with the License. @rem You may obtain a copy of the License at @rem -@rem http://www.apache.org/licenses/LICENSE-2.0 +@rem https://www.apache.org/licenses/LICENSE-2.0 @rem @rem Unless required by applicable law or agreed to in writing, software @rem distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/org/xbib/systemd/DefaultJournalEntry.java b/src/main/java/org/xbib/systemd/DefaultJournalEntry.java index 5e39be7..5b8ccc2 100644 --- a/src/main/java/org/xbib/systemd/DefaultJournalEntry.java +++ b/src/main/java/org/xbib/systemd/DefaultJournalEntry.java @@ -416,11 +416,6 @@ public class DefaultJournalEntry implements JournalEntry { @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("priority=") - .append(this.priority) - .append(",message=") - .append(this.message); - return sb.toString(); + return "priority=" + this.priority + ",message=" + this.message; } } diff --git a/src/main/java/org/xbib/systemd/SystemdJournalConsumer.java b/src/main/java/org/xbib/systemd/SystemdJournalConsumer.java index 65194a7..2effbad 100644 --- a/src/main/java/org/xbib/systemd/SystemdJournalConsumer.java +++ b/src/main/java/org/xbib/systemd/SystemdJournalConsumer.java @@ -102,7 +102,6 @@ public class SystemdJournalConsumer implements Runnable { private JournalEntry makeEntry(List list) { DefaultJournalEntry journalEntry = new DefaultJournalEntry(); for (String string : list) { - logger.log(Level.INFO, "entry: " + string); if (string.startsWith("MESSAGE=")) { journalEntry.setMessage(string.substring(8)); continue; @@ -197,9 +196,7 @@ public class SystemdJournalConsumer implements Runnable { } if (string.startsWith("_SYSTEMD_USER_UNIT=")) { journalEntry.setSystemdUserUnit(string.substring(18)); - continue; } - } return journalEntry; }