Improve Console window output.

-> Log Pre- and Post-Launch command happenings
-> Enable the java part to specify the level

TODO: fix logging with mc 1.7's log4j logging infrastructure

Signed-off-by: Orochimarufan <orochimarufan.x3@gmail.com>
This commit is contained in:
Orochimarufan
2014-01-17 22:55:10 +01:00
parent 7b96d74d3b
commit 188d0d5886
10 changed files with 249 additions and 83 deletions

View File

@ -153,4 +153,27 @@ public class Utils
}
return null;
}
/**
* Log to the MultiMC console
*
* @param message A String containing the message
* @param level A String containing the level name. See MinecraftProcess::getLevel()
*/
public static void log(String message, String level)
{
// Kinda dirty
String tag = "!![" + level + "]!";
System.out.println(tag + message.replace("\n", "\n" + tag));
}
public static void log(String message)
{
log(message, "MultiMC");
}
public static void log()
{
System.out.println();
}
}