Skip to content
Snippets Groups Projects
Commit 974c4f89 authored by Sergey Yakubov's avatar Sergey Yakubov
Browse files

async log

parent 129d86ae
No related branches found
No related tags found
No related merge requests found
......@@ -46,8 +46,7 @@ void SpdLogger::UpdateLoggerSinks() {
if (centralized_log_) {
sinks_.push_back(std::shared_ptr<FluentdSink> {new FluentdSink(endpoint_uri_)});
}
log__ = std::unique_ptr<spdlog::logger> {new spdlog::logger(name_, std::begin(sinks_), std::end(sinks_))};
log__ = std::unique_ptr<spdlog::logger> {new spdlog::async_logger(name_, std::begin(sinks_), std::end(sinks_), 1024)};
}
SpdLogger::SpdLogger(const std::string& name, const std::string& endpoint_uri): name_{name}, endpoint_uri_{endpoint_uri} {
......
......@@ -18,6 +18,7 @@ std::string string_format( const std::string& format, Args ... args ) {
void StatisticsSenderInfluxDb::SendStatistics(const StatisticsToSend& statistic) const noexcept {
//todo: send statistics async
HttpCode code;
Error err;
auto responce = httpclient__->Post(GetReceiverConfig()->monitor_db_uri + "/write?db=" +
......
......@@ -36,6 +36,6 @@ brokerid=`echo $!`
mkdir files
$1 localhost:4200 100 100 &
#producerrid=`echo $!`
sleep 0.3
sleep 0.1
$4 ${broker_address} ${broker_database_name} 2 | grep "Processed 100 file(s)"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment