about summary refs log tree commit diff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
new file mode 100644
index 000000000000..aca6aba900ad
--- /dev/null
+++ b/src/main.rs
@@ -0,0 +1,22 @@
+#[macro_use] extern crate failure;
+extern crate libc;
+
+mod journald;
+
+use std::process;
+
+fn main() {
+    let mut journal = match journald::open_journal() {
+        Ok(journal) => journal,
+        Err(e) => {
+            println!("{}", e);
+            process::exit(1);
+        },
+    };
+
+    println!("foo");
+    
+    let entry = journal.read_next();
+
+    println!("Entry: {:?}", entry)
+}