APISonar


com.facebook.internal.Logger.log

> com > facebook > internal > Logger > log
com APIs facebook APIs internal APIs Logger APIs log APIs

Example 1
static InputStream getCachedImageStream(URL url, Context context) {
        InputStream imageStream = null;
        if (url != null) {
            if (isCDNURL(url)) {
                try {
                    FileLruCache cache = getCache(context);
                    imageStream = cache.get(url.toString());
                } catch (IOException e) {
                    Logger.log(LoggingBehavior.CACHE, Log.WARN, TAG, e.toString());
                }
            }
        }

        return imageStream;
    }
Example 2
public void logConversionPixel(String pixelId, double valueOfPixel) {

        if (pixelId == null) {
            Logger.log(LoggingBehavior.DEVELOPER_ERRORS, "Insights", "pixelID cannot be null");
            return;
        }

        Bundle parameters = new Bundle();
        parameters.putString(EVENT_PARAMETER_PIXEL_ID, pixelId);
        parameters.putDouble(EVENT_PARAMETER_PIXEL_VALUE, valueOfPixel);

        appEventsLogger.logEvent(EVENT_NAME_LOG_CONVERSION_PIXEL, valueOfPixel, parameters);
        AppEventsLogger.eagerFlush();
    }
Example 3
static List<Response> createResponsesFromString(String responseString, HttpURLConnection connection,
            RequestBatch requests, boolean isFromCache) throws FacebookException, JSONException, IOException {
        JSONTokener tokener = new JSONTokener(responseString);
        Object resultObject = tokener.nextValue();

        List<Response> responses = createResponsesFromObject(connection, requests, resultObject, isFromCache);
        Logger.log(LoggingBehavior.REQUESTS, RESPONSE_LOG_TAG, "Response\n  Id: %s\n  Size: %d\n  Responses:\n%s\n",
                requests.getId(), responseString.length(), responses);

        return responses;
    }
Example 4
public void sendEvent(String pixelId, String event_name, String jsonString) {
        if (pixelId == null) {
            Logger.log(LoggingBehavior.DEVELOPER_ERRORS, TAG,
                                "Can't bridge an event without a referral Pixel ID. " +
                                        "Check your webview Pixel configuration");
            return;
        }
        final InternalAppEventsLogger logger = new InternalAppEventsLogger(this.context);

        Bundle parameters = jsonStringToBundle(jsonString);
        parameters.putString(PARAMETER_FBSDK_PIXEL_REFERRAL, pixelId);
        logger.logEvent(event_name, parameters);
    }
Example 5
static void augmentWebView(WebView webView, Context context) {
        String[] parts = Build.VERSION.RELEASE.split("\\.");
        int majorRelease = parts.length > 0 ? Integer.parseInt(parts[0]) : 0;
        int minorRelease = parts.length > 1 ? Integer.parseInt(parts[1]) : 0;

        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1 ||
                majorRelease < 4 || (majorRelease == 4 && minorRelease <= 1)) {
            Logger.log(LoggingBehavior.DEVELOPER_ERRORS, TAG,
                    "augmentWebView is only available for Android SDK version >= 17 on devices " +
                            "running Android >= 4.2");
            return;
        }
        webView.addJavascriptInterface(new FacebookSDKJSInterface(context),
                "fbmq_" + FacebookSdk.getApplicationId());
    }