More logging tweaks, including some aimed at userdev.

`forge.logging.markers=<LIST OF MARKERS>` will enable markers.

Signed-off-by: cpw <[email protected]>
This commit is contained in:
cpw committed 2019-01-27 00:06:57 -05:00
1 parent 3c55b46ca0
commit 0a11ffb827
14 files changed
+79 -78

No files matched your search

@@ -36,19 +36,8 @@ public class UserdevLauncher
{
public static void main(String... args) throws InterruptedException
{
Configurator.setRootLevel(Level.DEBUG);
final MarkerFilter classloadingFilter = MarkerFilter.createFilter("CLASSLOADING", Filter.Result.DENY, Filter.Result.NEUTRAL);
final MarkerFilter launchpluginFilter = MarkerFilter.createFilter("LAUNCHPLUGIN", Filter.Result.DENY, Filter.Result.NEUTRAL);
final MarkerFilter axformFilter= MarkerFilter.createFilter("AXFORM", Filter.Result.DENY, Filter.Result.NEUTRAL);
final MarkerFilter eventbusFilter = MarkerFilter.createFilter("EVENTBUS", Filter.Result.DENY, Filter.Result.NEUTRAL);
final MarkerFilter distxformFilter = MarkerFilter.createFilter("DISTXFORM", Filter.Result.DENY, Filter.Result.NEUTRAL);
final LoggerContext logcontext = LoggerContext.getContext(false);
logcontext.getConfiguration().addFilter(classloadingFilter);
logcontext.getConfiguration().addFilter(launchpluginFilter);
logcontext.getConfiguration().addFilter(axformFilter);
logcontext.getConfiguration().addFilter(eventbusFilter);
logcontext.getConfiguration().addFilter(distxformFilter);
logcontext.updateLoggers();
final String markerselection = System.getProperty("forge.logging.markers", "");
Arrays.stream(markerselection.split(",")).forEach(marker-> System.setProperty("forge.logging.marker."+ marker.toLowerCase(Locale.ROOT), "ACCEPT"));
String assets = System.getenv().getOrDefault("assetDirectory", "assets");
String target = System.getenv().get("target");