Skip to content

Commit

Permalink
Merge pull request #161 from HydrolienF/2.0
Browse files Browse the repository at this point in the history
2.0 Ant update
  • Loading branch information
HydrolienF committed Apr 27, 2023
2 parents 21a19d9 + e355c9f commit 437352e
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions core/src/main/java/fr/formiko/kokcinelo/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,8 @@ public void playEndGameSound(boolean haveWin) {
* @param exception exception that have been catch
*/
public static void log(int logLevel, String tag, String message, Exception exception) {
// tag = updatedTag(logLevel, tag);
String tagTemp = getCurrentTime() + " " + logLevelToString(logLevel);
// tagTemp+= " " + Thread.currentThread().getName(); //HTML INCOMPATIBLE
tagTemp += " " + Thread.currentThread().getName(); // HTML INCOMPATIBLE
if (tag == null || tag.equals("")) {
tag = tagTemp;
} else {
Expand All @@ -238,10 +237,7 @@ public static void log(int logLevel, String tag, String message, Exception excep
case 1:
Gdx.app.log(tag, message);
break;
// case 2, 3, 4: //HTML INCOMPATIBLE
case 2:
case 3:
case 4:
case 2, 3, 4:
if (exception != null) {
Gdx.app.error(tag, message, exception);
} else {
Expand All @@ -251,6 +247,9 @@ public static void log(int logLevel, String tag, String message, Exception excep
Controller.getController().dispose();
}
break;
default:
Gdx.app.log(tag, message);
break;
}
} else {
System.out.println("[" + tag + "] " + message);
Expand Down Expand Up @@ -306,7 +305,6 @@ private static String logLevelToString(int logLevel) {
* @return log level String color
*/
private static String logLevelToStringColor(int logLevel) {
// HTML INCOMPATIBLE
switch (logLevel) {
case 0:
return color.BROWN;
Expand All @@ -321,7 +319,6 @@ private static String logLevelToStringColor(int logLevel) {
default:
return color.NEUTRAL;
}
// return "";
}
/**
* {@summary Return current time in standardized format.}
Expand All @@ -342,7 +339,7 @@ public static String getCurrentTime() {
public static String getCurrentVersion() {
if (version == null) {
FileHandle versionFile = Gdx.files.internal("version.md");
version = versionFile.exists() ? versionFile.readString() : "...";
version = versionFile.exists() ? versionFile.readString().split("\n")[0] : "...";
}
return version;
}
Expand Down

0 comments on commit 437352e

Please sign in to comment.