mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +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
|
||||
public String getArgsDescription() {
|
||||
return "<version> <dir>";
|
||||
return "[version] [dir]";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -24,7 +24,7 @@ public DownloadClientCommand(LaunchServer server) {
|
|||
|
||||
@Override
|
||||
public String getArgsDescription() {
|
||||
return "<version> <dir>";
|
||||
return "[version] [dir]";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -81,7 +81,7 @@ public IndexAssetCommand(LaunchServer server) {
|
|||
|
||||
@Override
|
||||
public String getArgsDescription() {
|
||||
return "<dir> <index> <output-dir>";
|
||||
return "[dir] [index] [output-dir]";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -24,7 +24,7 @@ public UnindexAssetCommand(LaunchServer server) {
|
|||
|
||||
@Override
|
||||
public String getArgsDescription() {
|
||||
return "<dir> <index> <output-dir>";
|
||||
return "[dir] [index] [output-dir]";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -403,16 +403,23 @@ public static String htmlFormatLog(Level level, String dateTime, String message,
|
|||
String levelColor;
|
||||
switch (level) {
|
||||
case WARNING:
|
||||
levelColor = "yellow";
|
||||
levelColor = "gravitlauncher-log-warning";
|
||||
break;
|
||||
case ERROR:
|
||||
levelColor = "red";
|
||||
levelColor = "gravitlauncher-log-error";
|
||||
break;
|
||||
default: // INFO, DEBUG, Unknown
|
||||
levelColor = "white";
|
||||
case INFO:
|
||||
levelColor = "gravitlauncher-log-info";
|
||||
break;
|
||||
case DEBUG:
|
||||
levelColor = "gravitlauncher-log-debug";
|
||||
break;
|
||||
default:
|
||||
levelColor = "gravitlauncher-log-unknown";
|
||||
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) {
|
||||
|
|
Loading…
Reference in a new issue