about summary refs log tree commit diff
path: root/src/main.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2018-05-27T18·09+0200
committerVincent Ambo <mail@tazj.in>2018-05-27T18·09+0200
commitc5cd12b81f3a2908c3f8202dbc94dc535cf092c4 (patch)
tree6e3b0fdf87b198810bc6555c533bcee6c148912e /src/main.rs
parent1ed238b4498f6d4f00216021cfa5be89e3cdf209 (diff)
feat(journald): Implement initial libsystemd journal calls
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)
+}