Example usage for android.util Log DEBUG

List of usage examples for android.util Log DEBUG

Introduction

In this page you can find the example usage for android.util Log DEBUG.

Prototype

int DEBUG

To view the source code for android.util Log DEBUG.

Click Source Link

Document

Priority constant for the println method; use Log.d.

Usage

From source file:com.github.tony19.timber.loggly.JsonFormatterTest.java

@Test
public void formatRendersDebugLevel() throws IOException {
    final JsonLog log = getLog(Log.DEBUG, "tag", "message", new RuntimeException());
    assertThat(log.level, is(equalTo("DEBUG")));
}

From source file:it.geosolutions.android.map.loaders.FeatureInfoLoader.java

/**
 * Process a single <FeatureInfoQuery>
 * @param query/*from   ww w .  j  a  v  a 2 s. c o m*/
 * @param data the result will be added to this array
 */
private boolean processQuery(FeatureInfoTaskQuery query, List<FeatureInfoQueryResult> data) {
    SpatialDataSourceHandler handler = query.getHandler();
    SpatialVectorTable table = query.getTable();
    String tableName = query.getTable().getName();
    // check visibility before adding the table
    // AdvancedStyle s = sm.getStyle(tableName);
    // if ( !StyleUtils.isVisible(s, zoomLevel) ) {
    // onProgressUpdate(0);
    // continue;
    // }
    double north = query.getN();
    double south = query.getS();
    double east = query.getE();
    double west = query.getW();
    Integer start = query.getStart();
    Integer limit = query.getLimit();
    if (Log.isLoggable("FEATURE_INFO_TASK", Log.DEBUG)) { // Log check to avoid
                                                          // string creation
        Log.d("FEATURE_INFO_TASK", "starting query for table " + tableName);
    }
    // this is empty to skip geometries that returns errors
    ArrayList<Feature> features = new ArrayList<Feature>();
    try {
        features = handler.intersectionToFeatureListBBOX("4326", table, north, south, east, west, start, limit);
    } catch (Exception e) {
        Log.e("FEATURE_INFO_TASK",
                "unable to retrive data for table'" + tableName + "\'.Error:" + e.getLocalizedMessage());
        // TODO now simply skip, do better work
    }
    // add features
    FeatureInfoQueryResult result = new FeatureInfoQueryResult();
    result.setLayerName(tableName);
    result.setFeatures(features);
    Log.v("FEATURE_INFO_TASK", features.size() + " items found for table " + tableName);
    features_loaded += features.size();
    // publishProgress(result);
    data.add(result);

    return true;

}

From source file:com.kth.common.utils.etc.LogUtil.java

/**
 * DEBUG  ?./* www.  ja  v a  2s  .  c om*/
 * 
 * @param clazz  ??  Class.
 * @param msg .
 */
public static void d(final Class<?> clazz, final String msg) {
    if (LogUtil.isDebugEnabled()) {
        Log.println(Log.DEBUG, TAG, LogUtil.getClassLineNumber(clazz) + " - " + msg);

        //  ?? ?   ?.
        if (LogUtil.isFileLogEnabled()) {
            write(Log.DEBUG, LogUtil.getClassLineNumber(clazz), msg);
        }
    }
}

From source file:com.samsung.richnotification.RichNotification.java

/**
  * This method will initialize RichNotification on the device.
  *//from  w ww  .j a  v a  2 s  .c o m
  */
private boolean initRichNotification(CallbackContext callbackContext) {
    if (Log.isLoggable(RICHNOTI, Log.DEBUG))
        Log.d(TAG, "Initializing RichNotification...");

    // This function takes care of error callbacks
    if (!isRichNotificationSupported(callbackContext)) {
        return false;
    } else if (mRichNotificationManager == null) {
        mRichNotificationManager = new SrnRichNotificationManager(mContext);
        mRichNotificationManager.start();
        mRichNotificationManager.registerRichNotificationListener(this);
    }

    boolean isConnected = mRichNotificationManager.isConnected();
    if (!isConnected) {
        Log.e(TAG, "Cannot send RichNotification. Device not connected.");
        callbackContext.error(RichNotificationHelper.DEVICE_NOT_CONNECTED);
        return false;
    } else {
        if (Log.isLoggable(RICHNOTI, Log.DEBUG))
            Log.d(TAG, "Initialization complete. Device is connected.");
    }

    return true;
}

From source file:it.geosolutions.android.map.loaders.FeaturePolygonLoader.java

/**
 * Process a single <FeaturePolygonQuery>
 * @param query// ww  w.j  av a2  s  .  co  m
 * @param data the result will be added to this array
 */
private boolean processQuery(FeaturePolygonTaskQuery query, List<FeaturePolygonQueryResult> data) {
    SpatialDataSourceHandler handler = query.getHandler();
    SpatialVectorTable table = query.getTable();
    String tableName = query.getTable().getName();
    // check visibility before adding the table
    // AdvancedStyle s = sm.getStyle(tableName);
    // if ( !StyleUtils.isVisible(s, zoomLevel) ) {
    // onProgressUpdate(0);
    // continue;
    // }

    ArrayList<Coordinates_Query> polygon_points = query.getPolygonPoints();

    Integer start = query.getStart();
    Integer limit = query.getLimit();
    if (Log.isLoggable("FEATURE_Polygon_TASK", Log.DEBUG)) { // Log check to avoid
                                                             // string creation
        Log.d("FEATURE_Polygon_TASK", "starting query for table " + tableName);
    }
    // this is empty to skip geometries that returns errors
    ArrayList<Feature> features = new ArrayList<Feature>();
    /*try {
        features = handler.intersectionToPolygon("4326", table, polygon_points, start, limit);
    } catch (Exception e) {
        Log.e("FEATURE_Polygon_TASK", "unable to retrive data for table'"
        + tableName + "\'.Error:" + e.getLocalizedMessage());
        // TODO now simply skip, do better work
    }*/
    // add features
    FeaturePolygonQueryResult result = new FeaturePolygonQueryResult();
    result.setLayerName(tableName);
    result.setFeatures(features);
    Log.v("FEATURE_Polygon_TASK", features.size() + " items found for table " + tableName);
    features_loaded += features.size();
    // publishProgress(result);
    data.add(result);

    return true;

}

From source file:com.example.android.synchronizednotifications.DismissListener.java

@Override // ConnectionCallbacks
public void onConnected(Bundle bundle) {
    final Uri dataItemUri = new Uri.Builder().scheme(WEAR_URI_SCHEME).path(Constants.BOTH_PATH).build();
    if (Log.isLoggable(TAG, Log.DEBUG)) {
        Log.d(TAG, "Deleting Uri: " + dataItemUri.toString());
    }// w  ww  .  ja  v a  2  s .  com
    Wearable.DataApi.deleteDataItems(mGoogleApiClient, dataItemUri).setResultCallback(this);
}

From source file:com.infine.android.devoxx.ui.TwitterFragment2.java

/** {@inheritDoc} */
public void onQueryComplete(int token, Object cookie, Cursor cursor) {
    if (getActivity() == null) {
        return;/*from  w w w  .  j  a v  a  2 s  . c om*/
    }

    if (token == TweetsQuery._TOKEN) {
        onTweetsQueryComplete(cursor);
    } else {
        if (Log.isLoggable(TAG, Log.DEBUG)) {
            Log.d("SessionsFragment/onQueryComplete", "Query complete, Not Actionable: " + token);
        }
        cursor.close();
    }
}

From source file:com.samsung.multiwindow.MultiWindow.java

/**
 * This method will initialize Multiwindow on the device.
 * // w w w . java 2  s. c  o m
 */
private int intializeMultiwindow() {

    if (Log.isLoggable(MULTIWINDOW, Log.DEBUG)) {
        Log.d(TAG, "Inside intializeMultiwindow,");
    }
    mMultiWindow = new SMultiWindow();

    try {
        mMultiWindow.initialize(this.cordova.getActivity());
    } catch (SsdkUnsupportedException e) {
        return e.getType();
    }

    return INIT_SUCCESS;
}

From source file:de.madvertise.android.sdk.MadView.java

/**
 * Constructor/*from   w  w w  .j ava 2 s  .c  om*/
 * 
 * @param context
 * @param attrs
 */
public MadView(Context context, AttributeSet attrs) {
    super(context, attrs);

    MadUtil.logMessage(null, Log.DEBUG, "** Constructor for mad view called **");
    setVisibility(INVISIBLE);

    if (context.checkCallingOrSelfPermission(
            android.Manifest.permission.INTERNET) == PackageManager.PERMISSION_DENIED) {

        MadUtil.logMessage(null, Log.DEBUG, " *** ----------------------------- *** ");
        MadUtil.logMessage(null, Log.DEBUG, " *** Missing internet permissions! *** ");
        MadUtil.logMessage(null, Log.DEBUG, " *** ----------------------------- *** ");
        throw new IllegalArgumentException();
    }

    initParameters(attrs);

    Display display = ((WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE))
            .getDefaultDisplay();
    MadUtil.logMessage(null, Log.DEBUG,
            "Display values: Width = " + display.getWidth() + " ; Height = " + display.getHeight());

    setGravity(Gravity.CENTER);

    initialBackground = this.getBackground();
    Rect r = new Rect(0, 0, display.getWidth(), display.getHeight());
    textBannerBackground = generateBackgroundDrawable(r, backgroundColor, 0xffffff);

    setClickable(true);
    setFocusable(true);
    setDescendantFocusability(ViewGroup.FOCUS_BEFORE_DESCENDANTS);
}

From source file:com.google.android.apps.iosched.ui.MapFragment.java

private void runJs(String js) {
    if (Log.isLoggable(TAG, Log.DEBUG)) {
        Log.d(TAG, "Loading javascript:" + js);
    }// w w  w .j a va  2 s. c  o  m
    mWebView.loadUrl("javascript:" + js);
}