當前位置: 首頁>>代碼示例>>Java>>正文


Java Log.INFO屬性代碼示例

本文整理匯總了Java中android.util.Log.INFO屬性的典型用法代碼示例。如果您正苦於以下問題:Java Log.INFO屬性的具體用法?Java Log.INFO怎麽用?Java Log.INFO使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在android.util.Log的用法示例。


在下文中一共展示了Log.INFO屬性的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: prefixForPriority

public static String prefixForPriority(int priority) {
    switch (priority) {
        case Log.VERBOSE:
            return "[VERBOSE] ";
        case Log.DEBUG:
            return "[DEBUG] ";
        case Log.INFO:
            return "[INFO] ";
        case Log.WARN:
            return "[WARN] ";
        case Log.ERROR:
            return "[ERROR] ";
        case Log.ASSERT:
            return "[ASSERT] ";
        default:
            return "[UNKNOWN(" + priority + ")] ";
    }
}
 
開發者ID:sciage,項目名稱:FinalProject,代碼行數:18,代碼來源:LogMessageHelper.java

示例2: priorityToString

private static String priorityToString(int priority) {
    switch (priority) {
        case Log.ERROR:
            return "E";
        case Log.WARN:
            return "W";
        case Log.INFO:
            return "I";
        case Log.DEBUG:
            return "D";
        case Log.VERBOSE:
            return "V";
        default:
            return String.valueOf(priority);
    }
}
 
開發者ID:d4rken,項目名稱:RxShell,代碼行數:16,代碼來源:JUnitTree.java

示例3: logChunk

private void logChunk(int priority, String chunk) {
    logStr.append(LINE_SEPARATOR);
    logStr.append(chunk);
    String TAG = config.getTag();
    switch (priority) {
        case Log.ERROR:
            Log.e(TAG, chunk);
            break;
        case Log.INFO:
            Log.i(TAG, chunk);
            break;
        case Log.VERBOSE:
            Log.v(TAG, chunk);
            break;
        case Log.WARN:
            Log.w(TAG, chunk);
            break;
        case Log.ASSERT:
            Log.wtf(TAG, chunk);
            break;
        case Log.DEBUG:
        default:
            Log.d(TAG, chunk);
            break;
    }
}
 
開發者ID:youth5201314,項目名稱:XFrame,代碼行數:26,代碼來源:LoggerPrinter.java

示例4: getPriorityString

public String getPriorityString(int priority) {
    if (priority == Log.ASSERT) {
        return "A";
    } else if (priority == Log.ERROR) {
        return "E";
    } else if (priority == Log.WARN) {
        return "W";
    } else if (priority == Log.INFO) {
        return "I";
    } else if (priority == Log.DEBUG) {
        return "D";
    } else if (priority == Log.VERBOSE) {
        return "V";
    }
    return "";
}
 
開發者ID:gicheonkang,項目名稱:fast_face_android,代碼行數:16,代碼來源:DebugLogFileTree.java

示例5: getForegroundColorForLogLevel

public static int getForegroundColorForLogLevel(Context context, int logLevel) {
    int result = android.R.color.primary_text_dark;
    switch (logLevel) {
        case Log.DEBUG:
            result = R.color.foreground_debug;
            break;
        case Log.ERROR:
            result = R.color.foreground_error;
            break;
        case Log.INFO:
            result = R.color.foreground_info;
            break;
        case Log.VERBOSE:
            result = R.color.foreground_verbose;
            break;
        case Log.WARN:
            result = R.color.foreground_warn;
            break;
        case LOG_WTF:
            result = R.color.foreground_wtf;
            break;
    }
    return ContextCompat.getColor(context,result);
}
 
開發者ID:tranleduy2000,項目名稱:javaide,代碼行數:24,代碼來源:LogLineAdapterUtil.java

示例6: displayLevel

public String displayLevel() {
  switch (level) {
    case Log.VERBOSE:
      return "V";
    case Log.DEBUG:
      return "D";
    case Log.INFO:
      return "I";
    case Log.WARN:
      return "W";
    case Log.ERROR:
      return "E";
    case Log.ASSERT:
      return "A";
    default:
      return "?";
  }
}
 
開發者ID:rogues-dev,項目名稱:superglue,代碼行數:18,代碼來源:LumberYard.java

示例7: convertCharToLogLevel

private static int convertCharToLogLevel(char logLevelChar) {

        switch (logLevelChar) {
            case 'D':
                return Log.DEBUG;
            case 'E':
                return Log.ERROR;
            case 'I':
                return Log.INFO;
            case 'V':
                return Log.VERBOSE;
            case 'W':
                return Log.WARN;
            case 'F':
                return LogLineAdapterUtil.LOG_WTF; // 'F' actually stands for 'WTF', which is a real Android log level in 2.2
        }
        return -1;
    }
 
開發者ID:tranleduy2000,項目名稱:javaide,代碼行數:18,代碼來源:LogLine.java

示例8: longLog

private static void longLog(int mode, String tag, String message) {
    int maxLogSize = 1000;
    for (int i = 0; i <= message.length() / maxLogSize; i++) {
        int start = i * maxLogSize;
        int end = (i + 1) * maxLogSize;
        end = end > message.length() ? message.length() : end;

        if (mode == Log.DEBUG) {
            Log.d(TAG + tag, message.substring(start, end));
        } else if (mode == Log.ERROR) {
            Log.e(TAG + tag, message.substring(start, end));
        } else if (mode == Log.INFO) {
            Log.i(TAG + tag, message.substring(start, end));
        } else if (mode == Log.WARN) {
            Log.w(TAG + tag, message.substring(start, end));
        }
    }
}
 
開發者ID:qornanali,項目名稱:MyBlogPost,代碼行數:18,代碼來源:Logger.java

示例9: i

/**
 * Send an {@link Log#INFO} log message.
 *
 * @param obj
 */
public static void i(Object obj) {
    if (Log.INFO > DEBUG_LEVEL) {
        String tag = getClassName();
        String msg = obj != null ? obj.toString() : "obj == null";
        Log.i(tag, msg);
    }
}
 
開發者ID:TBoyLi,項目名稱:TMvpSimple,代碼行數:12,代碼來源:LogUtils.java

示例10: onLoadFailed

private void onLoadFailed(GlideException e, int maxLogLevel) {
  stateVerifier.throwIfRecycled();
  int logLevel = glideContext.getLogLevel();
  if (logLevel <= maxLogLevel) {
    Log.w(GLIDE_TAG, "Load failed for " + model + " with size [" + width + "x" + height + "]", e);
    if (logLevel <= Log.INFO) {
      e.logRootCauses(GLIDE_TAG);
    }
  }

  loadStatus = null;
  status = Status.FAILED;

  isCallingCallbacks = true;
  try {
    //TODO: what if this is a thumbnail request?
    if ((requestListener == null
        || !requestListener.onLoadFailed(e, model, target, isFirstReadyResource()))
        && (targetListener == null
        || !targetListener.onLoadFailed(e, model, target, isFirstReadyResource()))) {
      setErrorPlaceholder();
    }
  } finally {
    isCallingCallbacks = false;
  }

  notifyLoadFailed();
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:28,代碼來源:SingleRequest.java

示例11: isLoggable

@Implementation
public static synchronized boolean isLoggable(String tag, int level) {
    if ((TextUtils.equals(tag, "CursorWindowStats") && level <= Log.INFO)
            || (TextUtils.equals(tag, "SQLiteCursor") && level <= Log.DEBUG)) {
        return false;
    }

    return org.robolectric.shadows.ShadowLog.isLoggable(tag, level);
}
 
開發者ID:uhuru-mobile,項目名稱:mobile-store,代碼行數:9,代碼來源:ShadowLog.java

示例12: priorityToString

private static String priorityToString(int priority) {
  switch (priority) {
    case Log.ERROR:
      return "E";
    case Log.WARN:
      return "W";
    case Log.INFO:
      return "I";
    case Log.DEBUG:
      return "D";
    default:
      return String.valueOf(priority);
  }
}
 
開發者ID:Elias33,項目名稱:Quran,代碼行數:14,代碼來源:RecordingLogTree.java

示例13: print

private static void print(int mode, final String tag, String msg) {
	if (!isPrint) {
		return;
	}
	if (msg == null) {
		Log.e(tag, MSG);
		return;
	}
	switch (mode) {
	case Log.VERBOSE:
		Log.v(tag, msg);
		break;
	case Log.DEBUG:
		Log.d(tag, msg);
		break;
	case Log.INFO:
		Log.i(tag, msg);
		break;
	case Log.WARN:
		Log.w(tag, msg);
		break;
	case Log.ERROR:
		Log.e(tag, msg);
		break;
	default:
		Log.d(tag, msg);
		break;
	}
}
 
開發者ID:NewCasino,項目名稱:browser,代碼行數:29,代碼來源:LogUtil.java

示例14: log

public static void log(String tag, int level, String msg, Throwable tr) {
    if (isLog) {
        switch (level) {
            case Log.VERBOSE:
                if (tr == null) {
                    Log.v(tag, msg);
                } else {
                    Log.v(tag, msg, tr);
                }
                break;
            case Log.INFO:
                if (tr == null) {
                    Log.i(tag, msg);
                } else {
                    Log.i(tag, msg, tr);
                }
                break;
            case Log.DEBUG:
                if (tr == null) {
                    Log.d(tag, msg);
                } else {
                    Log.d(tag, msg, tr);
                }
                break;
            case Log.WARN:
                if (tr == null) {
                    Log.w(tag, msg);
                } else {
                    Log.w(tag, msg, tr);
                }
                break;
            case Log.ERROR:
                if (tr == null) {
                    Log.e(tag, msg, tr);
                } else {
                    Log.e(tag, msg, tr);
                }

                break;
        }
    }

}
 
開發者ID:xiaoxiaoliu6,項目名稱:MultipleDownload,代碼行數:43,代碼來源:LogUtils.java

示例15: i

public static void i(String tag, String msg) {
	if (LOG_LEVEL > Log.INFO) {
		Log.i(tag, msg);
	}
}
 
開發者ID:wangzhaosheng,項目名稱:publicProject,代碼行數:5,代碼來源:CommonLog.java


注:本文中的android.util.Log.INFO屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。