proper logging

This commit is contained in:
rusefillc 2024-08-21 16:57:40 -04:00
parent 449aa14acc
commit 6a9912791e
2 changed files with 9 additions and 5 deletions

View File

@ -1,9 +1,14 @@
plugins { plugins {
id 'java-library'
id 'java' id 'java'
} }
apply from: '../../android/dependencies.gradle' apply from: '../../android/dependencies.gradle'
dependencies {
api project(':logging-api')
}
java { java {
var boardDir = System.getenv("ABSOLUTE_BOARD_DIR") var boardDir = System.getenv("ABSOLUTE_BOARD_DIR")
println("gradle says: ABSOLUTE_BOARD_DIR=" + boardDir) println("gradle says: ABSOLUTE_BOARD_DIR=" + boardDir)

View File

@ -15,7 +15,7 @@ import java.util.logging.Logger;
import java.util.Objects; import java.util.Objects;
import java.util.Optional; import java.util.Optional;
import java.util.Properties; import java.util.Properties;
import com.devexperts.logging.Logging;
public class ConnectionAndMeta { public class ConnectionAndMeta {
public static final String BASE_URL_RELEASE = "https://github.com/rusefi/rusefi/releases/latest/download/"; public static final String BASE_URL_RELEASE = "https://github.com/rusefi/rusefi/releases/latest/download/";
@ -30,8 +30,7 @@ public class ConnectionAndMeta {
private long completeFileSize; private long completeFileSize;
private long lastModified; private long lastModified;
private static final Logging log = Logging.getLogging(ConnectionAndMeta.class);
private static Logger logger = Logger.getLogger(ConnectionAndMeta.class.getName());
public ConnectionAndMeta(String zipFileName) { public ConnectionAndMeta(String zipFileName) {
this.zipFileName = zipFileName; this.zipFileName = zipFileName;
@ -53,12 +52,12 @@ public class ConnectionAndMeta {
int startOfSuffix = jarFileName.lastIndexOf('_'); int startOfSuffix = jarFileName.lastIndexOf('_');
if (startOfSuffix > 0) { if (startOfSuffix > 0) {
String whiteLabel = jarFileName.substring(0, startOfSuffix); String whiteLabel = jarFileName.substring(0, startOfSuffix);
logger.info("WhiteLabel = " + whiteLabel); log.info("WhiteLabel = " + whiteLabel);
return whiteLabel; return whiteLabel;
} }
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); log.error("Unexpected " + e, e);
} }
return DEFAULT_WHITE_LABEL; return DEFAULT_WHITE_LABEL;
} }