mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-18 16:26:05 -04:00
add STDOUT & STDERR highlight
This commit is contained in:
parent
a8bc4eb352
commit
4fdafecf77
@ -19,17 +19,17 @@ import java.util.jar.JarFile
|
||||
import java.util.jar.Pack200
|
||||
import java.util.zip.GZIPOutputStream
|
||||
import java.security.MessageDigest
|
||||
import java.util.jar.JarOutputStream
|
||||
import java.util.zip.ZipEntry
|
||||
import java.util.zip.ZipFile
|
||||
|
||||
plugins {
|
||||
id "edu.sc.seis.macAppBundle" version "2.1.6"
|
||||
id "me.tatarka.retrolambda" version "3.5.0"
|
||||
id 'edu.sc.seis.launch4j' version '2.3.0'
|
||||
id "org.jetbrains.kotlin.jvm" version "1.1.2-2"
|
||||
}
|
||||
|
||||
import java.util.jar.JarOutputStream
|
||||
import java.util.zip.ZipEntry
|
||||
import java.util.zip.ZipFile
|
||||
|
||||
if (!hasProperty('mainClass')) {
|
||||
ext.mainClass = 'org.jackhuang.hmcl.Main'
|
||||
}
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
plugins {
|
||||
id "me.tatarka.retrolambda" version "3.5.0"
|
||||
id "org.jetbrains.kotlin.jvm" version "1.1.2-2"
|
||||
}
|
||||
|
||||
if (System.getenv("BUILD_NUMBER") != null)
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
plugins {
|
||||
id "me.tatarka.retrolambda" version "3.5.0"
|
||||
id "org.jetbrains.kotlin.jvm" version "1.1.2-2"
|
||||
}
|
||||
|
||||
if (System.getenv("BUILD_NUMBER") != null)
|
||||
|
@ -47,7 +47,7 @@ public enum Level {
|
||||
return this.level <= level.level;
|
||||
}
|
||||
|
||||
public static final Pattern MINECRAFT_LOGGER = Pattern.compile("\\[(?<timestamp>[0-9:]+)\\] \\[[^/]+/(?<level>[^\\]]+)\\]");
|
||||
public static final Pattern MINECRAFT_LOGGER = Pattern.compile("\\[(?<timestamp>[0-9:]+)\\] \\[[^/]+/(?<level>[^\\]]+)\\] \\[(?<category>[^\\]]+)\\]");
|
||||
public static final String JAVA_SYMBOL = "([a-zA-Z_$][a-zA-Z\\d_$]*\\.)+[a-zA-Z_$][a-zA-Z\\d_$]*";
|
||||
|
||||
public static Level guessLevel(String line, Level preLevel) {
|
||||
@ -79,6 +79,16 @@ public enum Level {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
String level2Str = m.group("category");
|
||||
if (null != level2Str)
|
||||
switch(level2Str) {
|
||||
case "STDOUT":
|
||||
level = INFO;
|
||||
break;
|
||||
case "STDERR":
|
||||
level = ERROR;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (line.contains("[INFO]") || line.contains("[CONFIG]") || line.contains("[FINE]")
|
||||
|| line.contains("[FINER]") || line.contains("[FINEST]"))
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
plugins {
|
||||
id "me.tatarka.retrolambda" version "3.5.0"
|
||||
id "org.jetbrains.kotlin.jvm" version "1.1.2-2"
|
||||
}
|
||||
|
||||
if (System.getenv("BUILD_NUMBER") != null)
|
||||
|
@ -27,6 +27,7 @@ apply plugin: 'maven'
|
||||
|
||||
dependencies {
|
||||
compile 'com.google.code.gson:gson:2.2.4' // Apache License 2.0
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:1.1.2"
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn: classes, description: 'Creates a jar from the source files.') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user