mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-07-31 13:18:51 +00:00
Add --verbosity=verbose log level
PR #2371 <https://github.com/Genymobile/scrcpy/pull/2371> Signed-off-by: Romain Vimont <rom@rom1v.com>
This commit is contained in:
parent
7db0189f23
commit
937fa704a6
6 changed files with 20 additions and 3 deletions
|
@ -12,7 +12,7 @@ public final class Ln {
|
|||
private static final String PREFIX = "[server] ";
|
||||
|
||||
enum Level {
|
||||
DEBUG, INFO, WARN, ERROR
|
||||
VERBOSE, DEBUG, INFO, WARN, ERROR
|
||||
}
|
||||
|
||||
private static Level threshold = Level.INFO;
|
||||
|
@ -36,6 +36,13 @@ public final class Ln {
|
|||
return level.ordinal() >= threshold.ordinal();
|
||||
}
|
||||
|
||||
public static void v(String message) {
|
||||
if (isEnabled(Level.VERBOSE)) {
|
||||
Log.v(TAG, message);
|
||||
System.out.println(PREFIX + "VERBOSE: " + message);
|
||||
}
|
||||
}
|
||||
|
||||
public static void d(String message) {
|
||||
if (isEnabled(Level.DEBUG)) {
|
||||
Log.d(TAG, message);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue