diff options
author | Orochimarufan <orochimarufan.x3@gmail.com> | 2014-01-17 22:55:10 +0100 |
---|---|---|
committer | Orochimarufan <orochimarufan.x3@gmail.com> | 2014-01-17 22:55:10 +0100 |
commit | 188d0d58865f5e134b5803bda2cd631a61cf2915 (patch) | |
tree | be2aca8f9205db5f1bfa6e37e183c596f1fe832f /depends/launcher/org/multimc/Utils.java | |
parent | 7b96d74d3b197c23324c5a364809a91ea6800e4e (diff) | |
download | MultiMC-188d0d58865f5e134b5803bda2cd631a61cf2915.tar MultiMC-188d0d58865f5e134b5803bda2cd631a61cf2915.tar.gz MultiMC-188d0d58865f5e134b5803bda2cd631a61cf2915.tar.lz MultiMC-188d0d58865f5e134b5803bda2cd631a61cf2915.tar.xz MultiMC-188d0d58865f5e134b5803bda2cd631a61cf2915.zip |
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>
Diffstat (limited to 'depends/launcher/org/multimc/Utils.java')
-rw-r--r-- | depends/launcher/org/multimc/Utils.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/depends/launcher/org/multimc/Utils.java b/depends/launcher/org/multimc/Utils.java index c4d55b6e..df0ef861 100644 --- a/depends/launcher/org/multimc/Utils.java +++ b/depends/launcher/org/multimc/Utils.java @@ -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(); + } } |