Я получаю неправильное std::string
значение размера.
statsd_link* statsd_init(std::string& host, int port) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
"statsd_init print data to %s:%d and length: %ld, %ld\n",
host.c_str(), port, strlen(host.c_str()), host.size());
}
И вывод:
2019-06-22 20:55:35.553331 [DEBUG] statsd_init print data to 127.0.0.1:8125 and length: 9, 0