mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-13 06:39:54 -04:00
Debug log output: redirect error stream to output stream
This commit is contained in:
parent
99444d8b4a
commit
09da15ef13
@ -985,18 +985,19 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
PrintStream theStreamOut = new PrintStream( new LoggerJava.LoggerOutputStream(System.out, printLog));
|
PrintStream theStreamOut = new PrintStream(new LoggerJava.LoggerOutputStream(System.out, printLog));
|
||||||
System.setOut(theStreamOut);
|
System.setOut(theStreamOut);
|
||||||
|
// Redirect error stream to output stream
|
||||||
|
System.setErr(theStreamOut);
|
||||||
|
|
||||||
|
/*
|
||||||
PrintStream theStreamErr = new PrintStream(new LoggerJava.LoggerOutputStream(System.err, printLog));
|
PrintStream theStreamErr = new PrintStream(new LoggerJava.LoggerOutputStream(System.err, printLog));
|
||||||
System.setErr(theStreamErr);
|
System.setErr(theStreamErr);
|
||||||
|
*/
|
||||||
fixRSAPadding();
|
fixRSAPadding();
|
||||||
|
|
||||||
System.out.println("> Running Minecraft with classpath:");
|
appendlnToLog("Running Minecraft with classpath: \n" + launchClassPath + "\n", false);
|
||||||
System.out.println(launchClassPath);
|
|
||||||
System.out.println();
|
|
||||||
|
|
||||||
// Load classpath
|
// Load classpath
|
||||||
DexClassLoader launchBaseLoader = new DexClassLoader(launchClassPath, launchOptimizedDirectory, launchLibrarySearchPath, getClassLoader());
|
DexClassLoader launchBaseLoader = new DexClassLoader(launchClassPath, launchOptimizedDirectory, launchLibrarySearchPath, getClassLoader());
|
||||||
|
|
||||||
@ -1165,12 +1166,20 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
|
|||||||
WindowAnimation.fadeOut(contentCanvas, 500);
|
WindowAnimation.fadeOut(contentCanvas, 500);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
private void appendToLog(String text) {
|
||||||
|
appendToLog(text, true);
|
||||||
|
}
|
||||||
|
|
||||||
private void appendlnToLog(String text) {
|
private void appendlnToLog(String text) {
|
||||||
appendToLog(text + "\n");
|
appendlnToLog(text, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void appendlnToLog(String text, boolean checkAllow) {
|
||||||
|
appendToLog(text + "\n", checkAllow);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void appendToLog(final String text) {
|
private void appendToLog(final String text, boolean checkAllow) {
|
||||||
if (!isLogAllow) return;
|
if (checkAllow && !isLogAllow) return;
|
||||||
textLog.post(new Runnable(){
|
textLog.post(new Runnable(){
|
||||||
@Override
|
@Override
|
||||||
public void run()
|
public void run()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user