Java Code Examples for com.blankj.utilcode.util.LogUtils#V

The following examples show how to use com.blankj.utilcode.util.LogUtils#V . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LogActivity.java    From Android-UtilCode with Apache License 2.0 4 votes vote down vote up
private void updateAbout(int args) {
    switch (args) {
        case UPDATE_LOG:
            log = !log;
            break;
        case UPDATE_CONSOLE:
            console = !console;
            break;
        case UPDATE_TAG:
            globalTag = globalTag.equals(TAG) ? "" : TAG;
            break;
        case UPDATE_HEAD:
            head = !head;
            break;
        case UPDATE_FILE:
            file = !file;
            break;
        case UPDATE_DIR:
            if (getDir().contains("test")) {
                dir = null;
            } else {
                if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {
                    dir = Environment.getExternalStorageDirectory().getPath() + System.getProperty("file.separator") + "test";
                }
            }
            break;
        case UPDATE_BORDER:
            border = !border;
            break;
        case UPDATE_CONSOLE_FILTER:
            consoleFilter = consoleFilter == LogUtils.V ? LogUtils.W : LogUtils.V;
            break;
        case UPDATE_FILE_FILTER:
            fileFilter = fileFilter == LogUtils.V ? LogUtils.I : LogUtils.V;
            break;
    }
    mBuilder.setLogSwitch(log)
            .setConsoleSwitch(console)
            .setGlobalTag(globalTag)
            .setLogHeadSwitch(head)
            .setLog2FileSwitch(file)
            .setDir(dir)
            .setBorderSwitch(border)
            .setConsoleFilter(consoleFilter)
            .setFileFilter(fileFilter);
    tvAboutLog.setText(mBuilder.toString());
}