use of com.insightfullogic.honest_profiler.core.profiles.ProfileListener in project honest-profiler by jvm-profiling-tools.
the class ConsoleApplication method displayLogFile.
private void displayLogFile() {
try {
if (!logLocation.exists() || !logLocation.canRead()) {
error.stream().println("Unable to find log file at: " + logLocation);
return;
}
ProfileListener listener = ui;
if (filterDescription != null) {
ProfileFilter filter = new ProfileFilter();
filter.updateFilters(filterDescription);
listener = profile -> {
filter.accept(profile);
ui.accept(profile);
};
}
output.stream().println("Printing Profile for: " + logLocation.getAbsolutePath());
Monitor.consumeFile(new FileLogSource(logLocation), listener);
} catch (Exception e) {
// TODO: better error handling
e.printStackTrace(error.stream());
}
}
Aggregations