From 84a0a5f236b5f65ffd26453d7b1b12c123615893 Mon Sep 17 00:00:00 2001 From: Arvin Schnell Date: Fri, 20 Feb 2015 14:39:43 +0100 Subject: [PATCH] - initialize logging --- client/installation-helper.cc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/client/installation-helper.cc b/client/installation-helper.cc index e0615105..8e80976b 100644 --- a/client/installation-helper.cc +++ b/client/installation-helper.cc @@ -35,6 +35,7 @@ #include #include #include +#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 }, -- 2.47.3