From: Arvin Schnell Date: Fri, 20 Feb 2015 13:39:43 +0000 (+0100) Subject: - initialize logging X-Git-Tag: v0.2.6^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F149%2Fhead;p=thirdparty%2Fsnapper.git - initialize logging --- 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 },