Java Code Examples for com.facebook.Settings#isLoggingBehaviorEnabled()

The following examples show how to use com.facebook.Settings#isLoggingBehaviorEnabled() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Logger.java    From KlyphMessenger with MIT License 5 votes vote down vote up
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();
        }
    }
}
 
Example 2
Source File: Logger.java    From facebook-api-android-maven with Apache License 2.0 5 votes vote down vote up
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();
        }
    }
}
 
Example 3
Source File: Logger.java    From Abelana-Android with Apache License 2.0 5 votes vote down vote up
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();
        }
    }
}
 
Example 4
Source File: Logger.java    From Klyph with MIT License 5 votes vote down vote up
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();
        }
    }
}
 
Example 5
Source File: Logger.java    From aws-mobile-self-paced-labs-samples with Apache License 2.0 5 votes vote down vote up
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();
        }
    }
}
 
Example 6
Source File: Logger.java    From FacebookNewsfeedSample-Android with Apache License 2.0 4 votes vote down vote up
private boolean shouldLog() {
    return Settings.isLoggingBehaviorEnabled(behavior);
}
 
Example 7
Source File: Logger.java    From FacebookNewsfeedSample-Android with Apache License 2.0 4 votes vote down vote up
public synchronized static void registerAccessToken(String accessToken) {
    if (Settings.isLoggingBehaviorEnabled(LoggingBehavior.INCLUDE_ACCESS_TOKENS) == false) {
        registerStringToReplace(accessToken, "ACCESS_TOKEN_REMOVED");
    }
}
 
Example 8
Source File: Logger.java    From KlyphMessenger with MIT License 4 votes vote down vote up
private boolean shouldLog() {
    return Settings.isLoggingBehaviorEnabled(behavior);
}
 
Example 9
Source File: Logger.java    From android-skeleton-project with MIT License 4 votes vote down vote up
private boolean shouldLog() {
    return Settings.isLoggingBehaviorEnabled(behavior);
}
 
Example 10
Source File: Logger.java    From aws-mobile-self-paced-labs-samples with Apache License 2.0 4 votes vote down vote up
private boolean shouldLog() {
    return Settings.isLoggingBehaviorEnabled(behavior);
}
 
Example 11
Source File: Logger.java    From FacebookNewsfeedSample-Android with Apache License 2.0 4 votes vote down vote up
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);
    }
}
 
Example 12
Source File: Logger.java    From android-skeleton-project with MIT License 4 votes vote down vote up
public synchronized static void registerAccessToken(String accessToken) {
    if (Settings.isLoggingBehaviorEnabled(LoggingBehavior.INCLUDE_ACCESS_TOKENS) == false) {
        registerStringToReplace(accessToken, "ACCESS_TOKEN_REMOVED");
    }
}
 
Example 13
Source File: Logger.java    From Abelana-Android with Apache License 2.0 4 votes vote down vote up
private boolean shouldLog() {
    return Settings.isLoggingBehaviorEnabled(behavior);
}
 
Example 14
Source File: Logger.java    From aws-mobile-self-paced-labs-samples with Apache License 2.0 4 votes vote down vote up
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);
    }
}
 
Example 15
Source File: Logger.java    From HypFacebook with BSD 2-Clause "Simplified" License 4 votes vote down vote up
private boolean shouldLog() {
    return Settings.isLoggingBehaviorEnabled(behavior);
}
 
Example 16
Source File: Logger.java    From barterli_android with Apache License 2.0 4 votes vote down vote up
public synchronized static void registerAccessToken(String accessToken) {
    if (Settings.isLoggingBehaviorEnabled(LoggingBehavior.INCLUDE_ACCESS_TOKENS) == false) {
        registerStringToReplace(accessToken, "ACCESS_TOKEN_REMOVED");
    }
}
 
Example 17
Source File: Logger.java    From Klyph with MIT License 4 votes vote down vote up
private boolean shouldLog() {
    return Settings.isLoggingBehaviorEnabled(behavior);
}
 
Example 18
Source File: Logger.java    From Klyph with MIT License 4 votes vote down vote up
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);
    }
}
 
Example 19
Source File: Logger.java    From Klyph with MIT License 4 votes vote down vote up
public synchronized static void registerAccessToken(String accessToken) {
    if (Settings.isLoggingBehaviorEnabled(LoggingBehavior.INCLUDE_ACCESS_TOKENS) == false) {
        registerStringToReplace(accessToken, "ACCESS_TOKEN_REMOVED");
    }
}
 
Example 20
Source File: Logger.java    From platform-friends-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
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);
    }
}