本文整理汇总了Java中com.android.ddmlib.Log.LogLevel.getByString方法的典型用法代码示例。如果您正苦于以下问题:Java LogLevel.getByString方法的具体用法?Java LogLevel.getByString怎么用?Java LogLevel.getByString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.android.ddmlib.Log.LogLevel
的用法示例。
在下文中一共展示了LogLevel.getByString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addNewFilter
import com.android.ddmlib.Log.LogLevel; //导入方法依赖的package包/类
private void addNewFilter(String defaultTag, String defaultText, String defaultPid,
String defaultAppName, LogLevel defaultLevel) {
LogCatFilterSettingsDialog d = new LogCatFilterSettingsDialog(
Display.getCurrent().getActiveShell());
d.setDefaults("", defaultTag, defaultText, defaultPid, defaultAppName, defaultLevel);
if (d.open() != Window.OK) {
return;
}
LogCatFilter f = new LogCatFilter(d.getFilterName().trim(),
d.getTag().trim(),
d.getText().trim(),
d.getPid().trim(),
d.getAppName().trim(),
LogLevel.getByString(d.getLogLevel()));
mLogCatFilters.add(f);
mFiltersTableViewer.refresh();
/* select the newly added entry */
int idx = mLogCatFilters.size() - 1;
mFiltersTableViewer.getTable().setSelection(idx);
filterSelectionChanged();
saveFilterPreferences();
}
示例2: addNewFilter
import com.android.ddmlib.Log.LogLevel; //导入方法依赖的package包/类
private void addNewFilter() {
LogCatFilterSettingsDialog d = new LogCatFilterSettingsDialog(
Display.getCurrent().getActiveShell());
if (d.open() != Window.OK) {
return;
}
LogCatFilter f = new LogCatFilter(d.getFilterName().trim(),
d.getTag().trim(),
d.getText().trim(),
d.getPid().trim(),
d.getAppName().trim(),
LogLevel.getByString(d.getLogLevel()));
mLogCatFilters.add(f);
mFiltersTableViewer.refresh();
/* select the newly added entry */
int idx = mLogCatFilters.size() - 1;
mFiltersTableViewer.getTable().setSelection(idx);
filterSelectionChanged();
saveFilterPreferences();
}
示例3: editSelectedFilter
import com.android.ddmlib.Log.LogLevel; //导入方法依赖的package包/类
private void editSelectedFilter() {
int selectedIndex = mFiltersTableViewer.getTable().getSelectionIndex();
if (selectedIndex < 0) {
return;
}
LogCatFilter curFilter = mLogCatFilters.get(selectedIndex);
LogCatFilterSettingsDialog dialog = new LogCatFilterSettingsDialog(
Display.getCurrent().getActiveShell());
dialog.setDefaults(curFilter.getName(), curFilter.getTag(), curFilter.getText(),
curFilter.getPid(), curFilter.getAppName(), curFilter.getLogLevel());
if (dialog.open() != Window.OK) {
return;
}
LogCatFilter f = new LogCatFilter(dialog.getFilterName(),
dialog.getTag(),
dialog.getText(),
dialog.getPid(),
dialog.getAppName(),
LogLevel.getByString(dialog.getLogLevel()));
mLogCatFilters.set(selectedIndex, f);
mFiltersTableViewer.refresh();
mFiltersTableViewer.getTable().setSelection(selectedIndex);
filterSelectionChanged();
saveFilterPreferences();
}
示例4: setLogLevel
import com.android.ddmlib.Log.LogLevel; //导入方法依赖的package包/类
/**
* Sets the minimum {@link LogLevel} to display.
* <p/>This change takes effect right away.
*/
public static void setLogLevel(String value) {
sLogLevel = LogLevel.getByString(value);
Log.setLevel(sLogLevel);
}