RTBKit
0.9
Open-source framework to create real-time ad bidding systems.
|
00001 #pragma once 00002 00003 #include <iostream> 00004 #include <boost/shared_ptr.hpp> 00005 #include "jml/arch/exception.h" 00006 #include <map> 00007 00008 namespace Datacratic{ 00009 00013 class IKvpLogger{ 00014 public: 00015 struct KvpLoggerParams{ 00016 std::string hostAndPort;//format host:port 00017 std::string db; 00018 std::string user; 00019 std::string pwd; 00020 bool failSafe;//if true, all errors are catched but printed to cerr 00021 }; 00022 00026 static std::shared_ptr<IKvpLogger> 00027 getKvpLogger(const std::string& type, const KvpLoggerParams&); 00028 00029 virtual void log(const std::map<std::string, std::string>&, const std::string&) = 0; 00030 virtual ~IKvpLogger(){}; 00031 }; 00032 00033 00034 }//namespace Datacratic