mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +03:00
[FIX] Фикс отображения HTML логов
This commit is contained in:
parent
bd44a55f6b
commit
3f7cbbb004
5 changed files with 16 additions and 9 deletions
|
@ -19,7 +19,7 @@ public DownloadAssetCommand(LaunchServer server) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getArgsDescription() {
|
public String getArgsDescription() {
|
||||||
return "<version> <dir>";
|
return "[version] [dir]";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -24,7 +24,7 @@ public DownloadClientCommand(LaunchServer server) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getArgsDescription() {
|
public String getArgsDescription() {
|
||||||
return "<version> <dir>";
|
return "[version] [dir]";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -81,7 +81,7 @@ public IndexAssetCommand(LaunchServer server) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getArgsDescription() {
|
public String getArgsDescription() {
|
||||||
return "<dir> <index> <output-dir>";
|
return "[dir] [index] [output-dir]";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -24,7 +24,7 @@ public UnindexAssetCommand(LaunchServer server) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getArgsDescription() {
|
public String getArgsDescription() {
|
||||||
return "<dir> <index> <output-dir>";
|
return "[dir] [index] [output-dir]";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -403,16 +403,23 @@ public static String htmlFormatLog(Level level, String dateTime, String message,
|
||||||
String levelColor;
|
String levelColor;
|
||||||
switch (level) {
|
switch (level) {
|
||||||
case WARNING:
|
case WARNING:
|
||||||
levelColor = "yellow";
|
levelColor = "gravitlauncher-log-warning";
|
||||||
break;
|
break;
|
||||||
case ERROR:
|
case ERROR:
|
||||||
levelColor = "red";
|
levelColor = "gravitlauncher-log-error";
|
||||||
break;
|
break;
|
||||||
default: // INFO, DEBUG, Unknown
|
case INFO:
|
||||||
levelColor = "white";
|
levelColor = "gravitlauncher-log-info";
|
||||||
|
break;
|
||||||
|
case DEBUG:
|
||||||
|
levelColor = "gravitlauncher-log-debug";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
levelColor = "gravitlauncher-log-unknown";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return String.format("%s <b><font color=\"%s\">[%s] %s</font></b>", dateTime, levelColor, level.toString(), sub ? ' ' + message : message);
|
if(sub) levelColor += " gravitlauncher-log-sub";
|
||||||
|
return String.format("%s <span class=\"gravitlauncher-log %s\">[%s] %s</span>", dateTime, levelColor, level.toString(), sub ? ' ' + message : message);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String ansiFormatVersion(String product) {
|
private static String ansiFormatVersion(String product) {
|
||||||
|
|
Loading…
Reference in a new issue