]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- initialize logging 149/head
authorArvin Schnell <aschnell@suse.de>
Fri, 20 Feb 2015 13:39:43 +0000 (14:39 +0100)
committerArvin Schnell <aschnell@suse.de>
Fri, 20 Feb 2015 13:39:43 +0000 (14:39 +0100)
client/installation-helper.cc

index e0615105ca482081f0daeb134f7e2ef13c4a9a72..8e80976b91c3ca0ffa8b51544d01aec88c564ab4 100644 (file)
@@ -35,6 +35,7 @@
 #include <snapper/Btrfs.h>
 #include <snapper/FileUtils.h>
 #include <snapper/Hooks.h>
+#include "snapper/Log.h"
 
 #include "utils/GetOpts.h"
 
@@ -192,11 +193,29 @@ step4()
 }
 
 
+void
+log_do(LogLevel level, const string& component, const char* file, const int line, const char* func,
+       const string& text)
+{
+    cerr << text << endl;
+}
+
+
+bool
+log_query(LogLevel level, const string& component)
+{
+    return level == ERROR;
+}
+
+
 int
 main(int argc, char** argv)
 {
     setlocale(LC_ALL, "");
 
+    setLogDo(&log_do);
+    setLogQuery(&log_query);
+
     const struct option options[] = {
        { "step",                       required_argument,      0,      0 },
        { "device",                     required_argument,      0,      0 },