本文整理汇总了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);
}
}