RTBKit
0.9
Open-source framework to create real-time ad bidding systems.
|
00001 #include "kvp_logger_interface.h" 00002 #include "kvp_logger_mongodb.h" 00003 #include "kvp_logger_void.h" 00004 namespace Datacratic{ 00005 00006 std::shared_ptr<IKvpLogger> 00007 IKvpLogger 00008 ::getKvpLogger(const std::string& type, const KvpLoggerParams& params){ 00009 if(type == "mongodb"){ 00010 return std::shared_ptr<IKvpLogger>(new KvpLoggerMongoDb(params)); 00011 }else if(type == "void"){ 00012 return std::shared_ptr<IKvpLogger>(new KvpLoggerVoid()); 00013 } 00014 throw ML::Exception("Unknown KvpLogger [" + type + "]"); 00015 } 00016 00017 }