-
Notifications
You must be signed in to change notification settings - Fork 616
Disable verbose logging in transport-runtime. #3648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,30 +24,51 @@ private static String getTag(String tag) { | |
} | ||
|
||
public static void d(String tag, String message) { | ||
Log.d(getTag(tag), message); | ||
tag = getTag(tag); | ||
if (Log.isLoggable(tag, Log.DEBUG)) { | ||
Log.d(tag, message); | ||
} | ||
} | ||
|
||
public static void d(String tag, String message, Object arg1) { | ||
Log.d(getTag(tag), String.format(message, arg1)); | ||
tag = getTag(tag); | ||
if (Log.isLoggable(tag, Log.DEBUG)) { | ||
Log.d(tag, String.format(message, arg1)); | ||
} | ||
} | ||
|
||
public static void d(String tag, String message, Object arg1, Object arg2) { | ||
Log.d(getTag(tag), String.format(message, arg1, arg2)); | ||
tag = getTag(tag); | ||
if (Log.isLoggable(tag, Log.DEBUG)) { | ||
Log.d(tag, String.format(message, arg1, arg2)); | ||
} | ||
} | ||
|
||
public static void d(String tag, String message, Object... args) { | ||
Log.d(getTag(tag), String.format(message, args)); | ||
tag = getTag(tag); | ||
if (Log.isLoggable(tag, Log.DEBUG)) { | ||
Log.d(tag, String.format(message, args)); | ||
} | ||
} | ||
|
||
public static void i(String tag, String message) { | ||
Log.i(getTag(tag), message); | ||
public static void i(String tag, String message, Object arg1) { | ||
tag = getTag(tag); | ||
if (Log.isLoggable(tag, Log.INFO)) { | ||
Log.i(tag, String.format(message, arg1)); | ||
} | ||
} | ||
|
||
public static void e(String tag, String message, Throwable e) { | ||
Log.e(getTag(tag), message, e); | ||
tag = getTag(tag); | ||
if (Log.isLoggable(tag, Log.ERROR)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Log.isLoggable will produce an error because sometimes it can exceed the limit of 23 characters |
||
Log.e(tag, message, e); | ||
} | ||
} | ||
|
||
public static void w(String tag, String message, Object arg1) { | ||
Log.w(getTag(tag), String.format(message, arg1)); | ||
tag = getTag(tag); | ||
if (Log.isLoggable(tag, Log.WARN)) { | ||
Log.w(tag, String.format(message, arg1)); | ||
} | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.