mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
Print info logs to stdout
All server logs were printed to stdout, while all client logs were printed to stderr. Instead, use stderr for warnings and errors, stdout for the others: - stdout: verbose, debug, info - stderr: warn, error
This commit is contained in:
parent
bb56472d4e
commit
4a25f3e53b
2 changed files with 24 additions and 2 deletions
|
|
@ -60,7 +60,7 @@ public final class Ln {
|
|||
public static void w(String message, Throwable throwable) {
|
||||
if (isEnabled(Level.WARN)) {
|
||||
Log.w(TAG, message, throwable);
|
||||
System.out.print(PREFIX + "WARN: " + message + '\n');
|
||||
System.err.print(PREFIX + "WARN: " + message + '\n');
|
||||
if (throwable != null) {
|
||||
throwable.printStackTrace();
|
||||
}
|
||||
|
|
@ -74,7 +74,7 @@ public final class Ln {
|
|||
public static void e(String message, Throwable throwable) {
|
||||
if (isEnabled(Level.ERROR)) {
|
||||
Log.e(TAG, message, throwable);
|
||||
System.out.print(PREFIX + "ERROR: " + message + "\n");
|
||||
System.err.print(PREFIX + "ERROR: " + message + "\n");
|
||||
if (throwable != null) {
|
||||
throwable.printStackTrace();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue