mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-12-14 12:37:23 +00:00
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:
@@ -31,11 +31,12 @@ enum Enum
|
||||
{
|
||||
MultiMC, /**< MultiMC Messages */
|
||||
Debug, /**< Debug Messages */
|
||||
Info, /**< Info Messages */
|
||||
Info, /**< Info Messages */
|
||||
Message, /**< Standard Messages */
|
||||
Warning, /**< Warnings */
|
||||
Error, /**< Errors */
|
||||
Fatal /**< Fatal Errors */
|
||||
Fatal, /**< Fatal Errors */
|
||||
PrePost, /**< Pre/Post Launch command output */
|
||||
};
|
||||
}
|
||||
|
||||
@@ -125,9 +126,17 @@ slots:
|
||||
void finish(int, QProcess::ExitStatus status);
|
||||
void on_stdErr();
|
||||
void on_stdOut();
|
||||
void on_prepost_stdOut();
|
||||
void on_prepost_stdErr();
|
||||
void logOutput(const QStringList &lines,
|
||||
MessageLevel::Enum defaultLevel = MessageLevel::Message,
|
||||
bool guessLevel = true, bool censor = true);
|
||||
void logOutput(QString line,
|
||||
MessageLevel::Enum defaultLevel = MessageLevel::Message,
|
||||
bool guessLevel = true, bool censor = true);
|
||||
|
||||
private:
|
||||
QString censorPrivateInfo(QString in);
|
||||
MessageLevel::Enum getLevel(const QString &message, MessageLevel::Enum defaultLevel);
|
||||
|
||||
MessageLevel::Enum guessLevel(const QString &message, MessageLevel::Enum defaultLevel);
|
||||
MessageLevel::Enum getLevel(const QString &levelName);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user