Logpublic class Log extends Object
Fields Summary |
---|
public static final String | CAMERA_LOGTAG_PREFIXAll Camera logging using this class will use this tag prefix.
Additionally, the prefix itself is checked in isLoggable and
serves as an override. So, to toggle all logs allowed by the
current {@link Configuration}, you can set properties:
adb shell setprop log.tag.CAM2PORT_ VERBOSE
adb shell setprop log.tag.CAM2PORT_ "" | private static final Tag | TAG |
Methods Summary |
---|
public static void | d(com.android.ex.camera2.portability.debug.Log$Tag tag, java.lang.String msg)
if (isLoggable(tag, android.util.Log.DEBUG)) {
android.util.Log.d(tag.toString(), msg);
}
| public static void | d(com.android.ex.camera2.portability.debug.Log$Tag tag, java.lang.String msg, java.lang.Throwable tr)
if (isLoggable(tag, android.util.Log.DEBUG)) {
android.util.Log.d(tag.toString(), msg, tr);
}
| public static void | e(com.android.ex.camera2.portability.debug.Log$Tag tag, java.lang.String msg)
if (isLoggable(tag, android.util.Log.ERROR)) {
android.util.Log.e(tag.toString(), msg);
}
| public static void | e(com.android.ex.camera2.portability.debug.Log$Tag tag, java.lang.String msg, java.lang.Throwable tr)
if (isLoggable(tag, android.util.Log.ERROR)) {
android.util.Log.e(tag.toString(), msg, tr);
}
| public static void | i(com.android.ex.camera2.portability.debug.Log$Tag tag, java.lang.String msg)
if (isLoggable(tag, android.util.Log.INFO)) {
android.util.Log.i(tag.toString(), msg);
}
| public static void | i(com.android.ex.camera2.portability.debug.Log$Tag tag, java.lang.String msg, java.lang.Throwable tr)
if (isLoggable(tag, android.util.Log.INFO)) {
android.util.Log.i(tag.toString(), msg, tr);
}
| private static boolean | isLoggable(com.android.ex.camera2.portability.debug.Log$Tag tag, int level)
try {
if (LogHelper.getOverrideLevel() != 0) {
// Override system log level and output. VERBOSE is smaller than
// ERROR, so the comparison checks that the override value is smaller
// than the desired output level. This applies to all tags.
return LogHelper.getOverrideLevel() <= level;
} else {
// The prefix can be used as an override tag to see all camera logs
return android.util.Log.isLoggable(CAMERA_LOGTAG_PREFIX, level)
|| android.util.Log.isLoggable(tag.toString(), level);
}
} catch (IllegalArgumentException ex) {
e(TAG, "Tag too long:" + tag);
return false;
}
| public static void | v(com.android.ex.camera2.portability.debug.Log$Tag tag, java.lang.String msg)
if (isLoggable(tag, android.util.Log.VERBOSE)) {
android.util.Log.v(tag.toString(), msg);
}
| public static void | v(com.android.ex.camera2.portability.debug.Log$Tag tag, java.lang.String msg, java.lang.Throwable tr)
if (isLoggable(tag, android.util.Log.VERBOSE)) {
android.util.Log.v(tag.toString(), msg, tr);
}
| public static void | w(com.android.ex.camera2.portability.debug.Log$Tag tag, java.lang.String msg, java.lang.Throwable tr)
if (isLoggable(tag, android.util.Log.WARN)) {
android.util.Log.w(tag.toString(), msg, tr);
}
| public static void | w(com.android.ex.camera2.portability.debug.Log$Tag tag, java.lang.String msg)
if (isLoggable(tag, android.util.Log.WARN)) {
android.util.Log.w(tag.toString(), msg);
}
|
|