APISonar


android.util.Log.DEBUG

> android > util > Log > DEBUG
android APIs util APIs Log APIs DEBUG APIs

Example 1
public void d(Object str) {
		if (debug) {
			if (logLevel <= Log.DEBUG) {
				String name = getFunctionName();
				if (name != null) {
					Log.d(tag, name + "\n" + str + "\n------------------------------------------------------------------------------");
				} else {
					Log.d(tag, str.toString());
				}
			}
		}
	}
Example 2
public CameraManager(Context context) {
        DEBUG = Log.isLoggable(TAG, Log.DEBUG);
        synchronized(mLock) {
            mContext = context;
        }
    }
Example 3
public static void d(String... msg) {
        if (ADB && LOG_DEGREE <= Log.DEBUG) {
        	getMethodNames(new Throwable().getStackTrace());
        	String msgStr = createLog(msg);

            Log.d(className, msgStr);

            writeLogToFile(Log.DEBUG, className, msgStr, null);
        }
    }
Example 4
public void stop(String description) {
    end = System.currentTimeMillis();
    isRunning = false;
    Logger.log(Log.DEBUG, LOG_TAG,
        String.format("%s: %d milliseconds.", description, getElapsedTimeInMillis()));
  }
Example 5
public static void d(Throwable t, String message) {
    if (isLoggable(Log.DEBUG)) {
      LogRedirector.d(TAG, message, t);
    }
  }
Example 6
private Logger(String TAG) {
    this.TAG = TAG;
    this.priority = Log.DEBUG;
  }
Example 7
public int d(Throwable throwable, Object s1, Object... args) {
        if( getLoggingLevel()> Log.DEBUG )
            return 0;

        final String s = Strings.toString(s1);
        final String message = formatArgs(s, args) + '\n' + Log.getStackTraceString(throwable);
        return println(Log.DEBUG, message);
    }
Example 8
public static void d(String format, Object... args) {
        if (needLog(Log.DEBUG)) {
            Log.d(TAG_DEBUG, buildMessage(format, args));
        }
    }
Example 9
public void onIncomingFileTransfer(String from, String file) throws RemoteException {
        if (Log.isLoggable(TAG, Log.DEBUG)) {
            LogCleaner.debug(TAG, "onIncomingFileTransfer(" + from + "," + file + ")");
        }
    }
Example 10
public CameraDevice(String cameraId) {
        mCameraId = cameraId;
        TAG = String.format("CameraDevice-%s-JV", mCameraId);
        DEBUG = Log.isLoggable(TAG, Log.DEBUG);
    }
Example 11
protected String processMessage(String msg) {
        if( getLoggingLevel() <= Log.DEBUG )
            msg = String.format("%s %s", Thread.currentThread().getName(), msg);
        return msg;
    }
Example 12
protected String getTag() {
        final int skipDepth = 6; // skip 6 stackframes to find the location where this was called
        if( getLoggingLevel() <= Log.DEBUG ) {
            final StackTraceElement trace = Thread.currentThread().getStackTrace()[skipDepth];
            return tag + "/" + trace.getFileName() + ":" + trace.getLineNumber();
        }

        return tag;
    }
Example 13
public static void d(Object obj) {
        if (Log.DEBUG > DEBUG_LEVEL) {
            String tag = getClassName();
            String msg = obj != null ? obj.toString() : "obj == null";
            Log.d(tag, msg);
        }
    }
Example 14
public void logd(String message, Exception e) {
        if (LOGTAG == null)
            return;
        if (logLevel > Log.DEBUG)
            return;
        Log.d(LOGTAG, getLogMessage(message));
        Log.d(LOGTAG, e.getMessage(), e);
    }
Example 15
private static int parseContentLength(String contentLengthHeader) {
    int result = UNKNOWN;
    if (!TextUtils.isEmpty(contentLengthHeader)) {
      try {
        result = Integer.parseInt(contentLengthHeader);
      } catch (NumberFormatException e) {
        if (Log.isLoggable(TAG, Log.DEBUG)) {
          Log.d(TAG, "failed to parse content length header: " + contentLengthHeader, e);
        }
      }
    }
    return result;
  }
Example 16
public void d_shouldLogAppropriately_withThrowable() {
    Throwable throwable = new Throwable();

    Log.d("tag", "msg", throwable);

    assertLogged(Log.DEBUG, "tag", "msg", throwable);
  }
Example 17
public static void applyNotification(Context context, Notification notification, int badgeCount) {
        if (Build.MANUFACTURER.equalsIgnoreCase("Xiaomi")) {
            try {
                Field field = notification.getClass().getDeclaredField("extraNotification");
                Object extraNotification = field.get(notification);
                Method method = extraNotification.getClass().getDeclaredMethod("setMessageCount", int.class);
                method.invoke(extraNotification, badgeCount);
            } catch (Exception e) {
                if (Log.isLoggable(LOG_TAG, Log.DEBUG)) {
                    Log.d(LOG_TAG, "Unable to execute badge", e);
                }
            }
        }
    }
Example 18
private Resource<?> decodeFromCache() throws Exception {
        Resource<?> result = null;
        try {
            result = decodeJob.decodeResultFromCache();
        } catch (Exception e) {
            if (Log.isLoggable(TAG, Log.DEBUG)) {
                Log.d(TAG, "Exception decoding result from cache: " + e);
            }
        }

        if (result == null) {
            result = decodeJob.decodeSourceFromCache();
        }
        return result;
    }
Example 19
public static String ipToString(int addr, String sep) {
		//myLog.l(Log.DEBUG, "IP as int: " + addr);
		if(addr > 0) {
			StringBuffer buf = new StringBuffer();
			buf.
			append(byteOfInt(addr, 0)).append(sep).
			append(byteOfInt(addr, 1)).append(sep).
			append(byteOfInt(addr, 2)).append(sep).
			append(byteOfInt(addr, 3));
			myLog.l(Log.DEBUG, "ipToString returning: " + buf.toString());
			return buf.toString();
		} else {
			return null;
		}	
	}
Example 20
public CameraDevice(String cameraId, StateListener listener, Handler handler) {
        if (cameraId == null || listener == null || handler == null) {
            throw new IllegalArgumentException("Null argument given");
        }
        mCameraId = cameraId;
        mDeviceListener = listener;
        mDeviceHandler = handler;
        TAG = String.format("CameraDevice-%s-JV", mCameraId);
        DEBUG = Log.isLoggable(TAG, Log.DEBUG);
    }
Example 21
public void onReceivedError(WebView view, int errorCode, String description,
      String failingUrl) {
    Logger.log(Log.DEBUG, LOG_TAG, "onReceiveError: " + description
        + ", error code: " + errorCode);
  }
Example 22
protected void initWorkManager() {
        Configuration config = (new Configuration.Builder())
                .setMinimumLoggingLevel(Log.DEBUG)
                .setWorkerFactory(new UploadWorker.Factory(mUploadStarter, mSiteStore))
                .build();
        WorkManager.initialize(this, config);
    }
Example 23
public static void d(String message) {
        if (!DEVELOP_MODE || TextUtils.isEmpty(message)) {
            return;
        }
        final StackTraceElement[] stack = new Throwable().getStackTrace();
        final int i = 1;
        final StackTraceElement ste = stack[i];
        Log.println(Log.DEBUG, LOG_TAG, String.format("[%s][%s][%s]%s", ste.getFileName(), ste.getMethodName(), ste.getLineNumber(), message));
    }
Example 24
public void onContactJoined(IChatSession ses, Contact contact) {
        if (Log.isLoggable(TAG, Log.DEBUG)) {
            LogCleaner.debug(TAG, "onContactJoined(" + ses + ", " + contact + ")");
        }
    }
Example 25
private boolean writeDataDirect(byte[] data, OutputStream os) {
        boolean success = true;
        try {
            os.write(data);
        } catch (IOException e) {
            if (Log.isLoggable(TAG, Log.DEBUG)) {
                Log.d(TAG, "Failed to write data to output stream in GifResourceEncoder", e);
            }
            success = false;
        }
        return success;
    }