summaryrefslogtreecommitdiff
path: root/dslog/Main.java
diff options
context:
space:
mode:
Diffstat (limited to 'dslog/Main.java')
-rw-r--r--dslog/Main.java18
1 files changed, 17 insertions, 1 deletions
diff --git a/dslog/Main.java b/dslog/Main.java
index 0d35e8b..159ee00 100644
--- a/dslog/Main.java
+++ b/dslog/Main.java
@@ -24,9 +24,25 @@ class Main {
});
}
+ public static void wch(String dirname) throws IOException {
+ Logdir.opendir(dirname).forEach((k,v)->{
+ boolean match = false;
+ try (DseventsReader r = v.dsevents()) {
+ if (r == null || r.version() != 3)
+ return;
+ while (r.hasNext()) {
+ DseventsReader.Event e = r.next();
+ System.out.println(e.time +"\u001E"+e.message);
+ }
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ });
+ }
+
public static void main(String[] args) throws IOException {
for (String dirname : args) {
- ls(dirname);
+ wch(dirname);
}
}
}