本文整理匯總了Java中com.facebook.Settings.isLoggingBehaviorEnabled方法的典型用法代碼示例。如果您正苦於以下問題:Java Settings.isLoggingBehaviorEnabled方法的具體用法?Java Settings.isLoggingBehaviorEnabled怎麽用?Java Settings.isLoggingBehaviorEnabled使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.facebook.Settings
的用法示例。
在下文中一共展示了Settings.isLoggingBehaviorEnabled方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: log
import com.facebook.Settings; //導入方法依賴的package包/類
public static void log(LoggingBehavior behavior, int priority, String tag, String string) {
if (Settings.isLoggingBehaviorEnabled(behavior)) {
string = replaceStrings(string);
if (tag.startsWith(LOG_TAG_BASE) == false) {
tag = LOG_TAG_BASE + tag;
}
Log.println(priority, tag, string);
// Developer errors warrant special treatment by printing out a stack trace, to make both more noticeable,
// and let the source of the problem be more easily pinpointed.
if (behavior == LoggingBehavior.DEVELOPER_ERRORS) {
(new Exception()).printStackTrace();
}
}
}
示例2: registerAccessToken
import com.facebook.Settings; //導入方法依賴的package包/類
public synchronized static void registerAccessToken(String accessToken) {
if (Settings.isLoggingBehaviorEnabled(LoggingBehavior.INCLUDE_ACCESS_TOKENS) == false) {
registerStringToReplace(accessToken, "ACCESS_TOKEN_REMOVED");
}
}
示例3: shouldLog
import com.facebook.Settings; //導入方法依賴的package包/類
private boolean shouldLog() {
return Settings.isLoggingBehaviorEnabled(behavior);
}
示例4: log
import com.facebook.Settings; //導入方法依賴的package包/類
public static void log(LoggingBehavior behavior, String tag, String format, Object... args) {
if (Settings.isLoggingBehaviorEnabled(behavior)) {
String string = String.format(format, args);
log(behavior, Log.DEBUG, tag, string);
}
}