当前位置: 首页>>代码示例>>Java>>正文


Java Log.VERBOSE属性代码示例

本文整理汇总了Java中android.util.Log.VERBOSE属性的典型用法代码示例。如果您正苦于以下问题:Java Log.VERBOSE属性的具体用法?Java Log.VERBOSE怎么用?Java Log.VERBOSE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在android.util.Log的用法示例。


在下文中一共展示了Log.VERBOSE属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getBackgroundColorForLogLevel

public static int getBackgroundColorForLogLevel(Context context, int logLevel) {
    int result = android.R.color.black;
    switch (logLevel) {
        case Log.DEBUG:
            result = R.color.background_debug;
            break;
        case Log.ERROR:
            result = R.color.background_error;
            break;
        case Log.INFO:
            result = R.color.background_info;
            break;
        case Log.VERBOSE:
            result = R.color.background_verbose;
            break;
        case Log.WARN:
            result = R.color.background_warn;
            break;
        case LOG_WTF:
            result = R.color.background_wtf;
            break;
    }

    return ContextCompat.getColor(context,result);
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:25,代码来源:LogLineAdapterUtil.java

示例2: 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

示例3: getLogcatLinePriority

private static LogcatLine.Priority getLogcatLinePriority(int priority) {
    if (Log.VERBOSE == priority) {
        return LogcatLine.Priority.VERBOSE;
    } else if (Log.DEBUG == priority) {
        return LogcatLine.Priority.DEBUG;
    } else if (Log.INFO == priority) {
        return LogcatLine.Priority.INFO;
    } else if (Log.WARN == priority) {
        return LogcatLine.Priority.WARNING;
    } else if (Log.ERROR == priority) {
        return LogcatLine.Priority.ERROR;
    } else if (Log.ASSERT == priority) {
        return LogcatLine.Priority.ASSERT;
    } else {
        return LogcatLine.Priority.SILENT;
    }
}
 
开发者ID:Manabu-GT,项目名称:DebugOverlay-Android,代码行数:17,代码来源:TimberDataModule.java

示例4: 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

示例5: 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

示例6: log

@Override
protected void log(int priority, String tag, String message, Throwable t) {
    if (priority == Log.VERBOSE || priority == Log.DEBUG) {
        return;
    }

    Log.println(priority, tag, message);

    if (t != null) {
        if (priority == Log.ERROR) {
            Log.e(tag, message, t);
        } else if (priority == Log.WARN) {
            Log.w(tag, message, t);
        }
    }
}
 
开发者ID:dbof10,项目名称:redux-observable,代码行数:16,代码来源:App.java

示例7: convertLogLevelToChar

private static char convertLogLevelToChar(int logLevel) {

        switch (logLevel) {
            case Log.DEBUG:
                return 'D';
            case Log.ERROR:
                return 'E';
            case Log.INFO:
                return 'I';
            case Log.VERBOSE:
                return 'V';
            case Log.WARN:
                return 'W';
            case LogLineAdapterUtil.LOG_WTF:
                return 'F';
        }
        return ' ';
    }
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:18,代码来源:LogLine.java

示例8: backgroundForLevel

public static @DrawableRes int backgroundForLevel(int level) {
  switch (level) {
    case Log.VERBOSE:
    case Log.DEBUG:
      return R.color.debug_log_accent_debug;
    case Log.INFO:
      return R.color.debug_log_accent_info;
    case Log.WARN:
      return R.color.debug_log_accent_warn;
    case Log.ERROR:
    case Log.ASSERT:
      return R.color.debug_log_accent_error;
    default:
      return R.color.debug_log_accent_unknown;
  }
}
 
开发者ID:rogues-dev,项目名称:superglue,代码行数:16,代码来源:LogAdapter.java

示例9: log

/**
 * Create new log entry in file.
 * <p>
 * You should not call it directly from your application build some facade (or use Timber) and set it to write to
 * PhialLogger.
 *
 * @param priority Log level. See {@link Log} for constants.
 * @param tag      Explicit or inferred tag. May be {@code null}.
 * @param message  Formatted log message. May be {@code null}.
 * @param t        Accompanying exceptions. May be {@code null}.
 */
public void log(int priority, String tag, String message, Throwable t) {
    final org.slf4j.Logger logger = LoggerFactory.getLogger(tag);

    switch (priority) {
        case Log.VERBOSE:
            logger.trace(message, t);
            break;
        case Log.DEBUG:
            logger.debug(message, t);
            break;
        case Log.INFO:
            logger.info(message, t);
            break;
        case Log.WARN:
            logger.warn(message, t);
            break;
        case Log.ERROR:
            logger.error(message, t);
            break;
        default:
            logger.error("unexpected Log priority: " + priority + " " + message, t);
            break;
    }
}
 
开发者ID:roshakorost,项目名称:Phial,代码行数:35,代码来源:PhialLogger.java

示例10: priorityString

public static String priorityString(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";
  }
}
 
开发者ID:yshrsmz,项目名称:historian,代码行数:18,代码来源:Util.java

示例11: log

@Override
protected void log(int priority, String tag, String message, Throwable throwable) {
    if (priority == Log.VERBOSE || priority == Log.DEBUG) {
        return;
    }

    FakeCrashLibrary.log(priority, tag, message);

    if (throwable != null) {
        if (priority == Log.ERROR) {
            FakeCrashLibrary.logError(throwable);
        } else if (priority == Log.WARN) {
            FakeCrashLibrary.logWarning(throwable);
        }
    }
}
 
开发者ID:davideas,项目名称:AndroidBlueprints,代码行数:16,代码来源:MyApplication.java

示例12: printCallHierarchy

/**
 * Print the array of stack trace elements of this method in black.
 *
 * @return
 */
public static void printCallHierarchy() {
    if (Log.VERBOSE > DEBUG_LEVEL) {
        String tag = getClassName();
        String method = callMethodAndLine();
        String hierarchy = getCallHierarchy();
        Log.v(tag, method + hierarchy);
        if (DEBUG_SYSOUT) {
            System.out.println(tag + "  " + method + hierarchy);
        }
    }
}
 
开发者ID:Xianicai,项目名称:TMvpSimple-master,代码行数:16,代码来源:LogUtils.java

示例13: v

/**
 * Send a {@link Log#VERBOSE} log message.
 *
 * @param obj
 */
public static void v(Object obj) {
    if (Log.VERBOSE > DEBUG_LEVEL) {
        String tag = getClassName();
        String msg = obj != null ? obj.toString() : "obj == null";
        Log.v(tag, msg);
    }
}
 
开发者ID:Xianicai,项目名称:TMvpSimple-master,代码行数:12,代码来源:LogUtils.java

示例14: log

@Override
protected void log(int priority, String tag, String message, Throwable t) {
    if (priority == Log.VERBOSE || priority == Log.DEBUG) {
        return;
    }
    super.log(priority, tag, message, t);
}
 
开发者ID:gicheonkang,项目名称:fast_face_android,代码行数:7,代码来源:DlibDemoApp.java

示例15: log

@Override
protected void log(int priority, String tag, String message, Throwable t) {
    if (priority == Log.VERBOSE || priority == Log.DEBUG) {
        return;
    }

    //TODO Log to crash reporting
    if (t != null) {
        if (priority == Log.ERROR) {
            //TODO Log throwable as error to crash reporting
        } else if (priority == Log.WARN) {
            //TODO Log throwable as warning to crash reporting
        }
    }
}
 
开发者ID:wongcain,项目名称:okuki,代码行数:15,代码来源:App.java


注:本文中的android.util.Log.VERBOSE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。