#include "dnsdist-snmp.hh"
#include "dolog.hh"
+static std::shared_ptr<const Logr::Logger> getLogger(const std::string_view fromFunction)
+{
+ return dnsdist::logging::getTopLogger()->withName("lua-ffi-script")->withValues("lua.ffi.function", Logging::Loggable(fromFunction));
+}
+
uint16_t dnsdist_ffi_dnsquestion_get_qtype(const dnsdist_ffi_dnsquestion_t* dq)
{
return dq->dq->ids.qtype;
dr->dr->ids.skipCache = true;
}
catch (const std::exception& e) {
- vinfolog("Error rebasing packet on a new DNSName: %s", e.what());
+ VERBOSESLOG(infolog("Error rebasing packet on a new DNSName: %s", e.what()),
+ getLogger(__func__)->error(Logr::Info, e.what(), "Error rebasing packet on a new DNSName"));
return false;
}
return dnsdist::suspendQuery(*dq->dq, asyncID, queryID, timeoutMs);
}
catch (const std::exception& e) {
- vinfolog("Error in dnsdist_ffi_dnsquestion_set_async: %s", e.what());
+ VERBOSESLOG(infolog("Error in dnsdist_ffi_dnsquestion_set_async: %s", e.what()),
+ getLogger(__func__)->error(Logr::Info, e.what(), "Error turning query asynchronous"));
+
}
catch (...) {
- vinfolog("Exception in dnsdist_ffi_dnsquestion_set_async");
+ VERBOSESLOG(infolog("Exception in dnsdist_ffi_dnsquestion_set_async"),
+ getLogger(__func__)->info(Logr::Info, "Unknown error turning query asynchronous"));
}
return false;
dq->dq->asynchronous = true;
auto dr = dynamic_cast<DNSResponse*>(dq->dq);
if (!dr) {
- vinfolog("Passed a DNSQuestion instead of a DNSResponse to dnsdist_ffi_dnsresponse_set_async");
+ VERBOSESLOG(infolog("Passed a DNSQuestion instead of a DNSResponse to dnsdist_ffi_dnsresponse_set_async"),
+ getLogger(__func__)->info(Logr::Info, "Passed a DNSQuestion instead of a DNSResponse"));
return false;
}
return dnsdist::suspendResponse(*dr, asyncID, queryID, timeoutMs);
}
catch (const std::exception& e) {
- vinfolog("Error in dnsdist_ffi_dnsresponse_set_async: %s", e.what());
+ VERBOSESLOG(infolog("Error in dnsdist_ffi_dnsresponse_set_async: %s", e.what()),
+ getLogger(__func__)->error(Logr::Info, e.what(), "Error turning response asynchronous"));
}
catch (...) {
- vinfolog("Exception in dnsdist_ffi_dnsresponse_set_async");
+ VERBOSESLOG(infolog("Exception in dnsdist_ffi_dnsresponse_set_async"),
+ getLogger(__func__)->info(Logr::Info, "Unknown error turning response asynchronous"));
}
return false;
}
bool dnsdist_ffi_resume_from_async(uint16_t asyncID, uint16_t queryID, const char* tag, size_t tagSize, const char* tagValue, size_t tagValueSize, bool useCache)
{
if (!dnsdist::g_asyncHolder) {
- vinfolog("Unable to resume, no asynchronous holder");
+ VERBOSESLOG(infolog("Unable to resume, no asynchronous holder"),
+ getLogger(__func__)->info(Logr::Info, "Unable to resume, no asynchronous holder"));
return false;
}
auto query = dnsdist::g_asyncHolder->get(asyncID, queryID);
if (!query) {
- vinfolog("Unable to resume, no object found for asynchronous ID %d and query ID %d", asyncID, queryID);
+ VERBOSESLOG(infolog("Unable to resume, no object found for asynchronous ID %d and query ID %d", asyncID, queryID),
+ getLogger(__func__)->info(Logr::Info, "Unable to resume, no object found for the supplied asynchronous and query IDs", "dnsdist.async.id", Logging::Loggable(asyncID), "dns.query.id", Logging::Loggable(queryID)));
return false;
}
bool dnsdist_ffi_set_rcode_from_async(uint16_t asyncID, uint16_t queryID, uint8_t rcode, bool clearAnswers)
{
if (!dnsdist::g_asyncHolder) {
+ VERBOSESLOG(infolog("Unable to resume and set rcode async, no asynchronous holder"),
+ getLogger(__func__)->info(Logr::Info, "Unable to resume and set rcode, no asynchronous holder"));
return false;
}
auto query = dnsdist::g_asyncHolder->get(asyncID, queryID);
if (!query) {
- vinfolog("Unable to resume with a custom response code, no object found for asynchronous ID %d and query ID %d", asyncID, queryID);
+ VERBOSESLOG(infolog("Unable to resume with a custom response code, no object found for asynchronous ID %d and query ID %d", asyncID, queryID),
+ getLogger(__func__)->info(Logr::Info, "Unable to resume, no object found for the supplied asynchronous and query IDs", "dnsdist.async.id", Logging::Loggable(asyncID), "dns.query.id", Logging::Loggable(queryID)));
return false;
}
ids.qname = std::move(parsed);
}
catch (const std::exception& e) {
- vinfolog("Error rebasing packet on a new DNSName: %s", e.what());
+ VERBOSESLOG(infolog("Error rebasing packet on a new DNSName: %s", e.what()),
+ getLogger(__func__)->error(Logr::Info, e.what(), "Error rebasing packet on a new DNSName"));
return false;
}
auto query = dnsdist::g_asyncHolder->get(asyncID, queryID);
if (!query) {
- vinfolog("Unable to resume with an alternate name, no object found for asynchronous ID %d and query ID %d", asyncID, queryID);
+ VERBOSESLOG(infolog("Unable to resume with an alternate name, no object found for asynchronous ID %d and query ID %d", asyncID, queryID),
+ getLogger(__func__)->info(Logr::Info, "Unable to resume, no object found for the supplied asynchronous and query IDs", "dnsdist.async.id", Logging::Loggable(asyncID), "dns.query.id", Logging::Loggable(queryID)));
return false;
}
auto query = dnsdist::g_asyncHolder->get(asyncID, queryID);
if (!query) {
- vinfolog("Unable to drop, no object found for asynchronous ID %d and query ID %d", asyncID, queryID);
+ VERBOSESLOG(infolog("Unable to drop, no object found for asynchronous ID %d and query ID %d", asyncID, queryID),
+ getLogger(__func__)->info(Logr::Info, "Unable to drop, no object found for the supplied asynchronous and query IDs", "dnsdist.async.id", Logging::Loggable(asyncID), "dns.query.id", Logging::Loggable(queryID)));
return false;
}
auto query = dnsdist::g_asyncHolder->get(asyncID, queryID);
if (!query) {
- vinfolog("Unable to resume with a custom answer, no object found for asynchronous ID %d and query ID %d", asyncID, queryID);
+ VERBOSESLOG(infolog("Unable to resume with a custom answer, no object found for asynchronous ID %d and query ID %d", asyncID, queryID),
+ getLogger(__func__)->info(Logr::Info, "Unable to resume with a custom answer, no object found for the supplied asynchronous and query IDs", "dnsdist.async.id", Logging::Loggable(asyncID), "dns.query.id", Logging::Loggable(queryID)));
return false;
}
return payload.size();
}
catch (const std::exception& e) {
- vinfolog("Exception in dnsdist_ffi_generate_proxy_protocol_payload: %s", e.what());
+ VERBOSESLOG(infolog("Exception in dnsdist_ffi_generate_proxy_protocol_payload: %s", e.what()),
+ getLogger(__func__)->error(Logr::Info, e.what(), "Exception while generating proxy protocol payload"));
return 0;
}
catch (...) {
- vinfolog("Unhandled exception in dnsdist_ffi_generate_proxy_protocol_payload");
+ VERBOSESLOG(infolog("Unhandled exception in dnsdist_ffi_generate_proxy_protocol_payload"),
+ getLogger(__func__)->info(Logr::Info, "Unknown exception while generating proxy protocol payload"));
return 0;
}
}
ca = ComboAddress(addr);
}
catch (const std::exception& e) {
- vinfolog("Error parsing address passed to dnsdist_ffi_packetcache_get_domain_list_by_addr: %s", e.what());
+ VERBOSESLOG(infolog("Error parsing address passed to dnsdist_ffi_packetcache_get_domain_list_by_addr: %s", e.what()),
+ getLogger(__func__)->error(Logr::Info, e.what(), "Error parsing address"));
return 0;
}
catch (const PDNSException& e) {
- vinfolog("Error parsing address passed to dnsdist_ffi_packetcache_get_domain_list_by_addr: %s", e.reason);
+ VERBOSESLOG(infolog("Error parsing address passed to dnsdist_ffi_packetcache_get_domain_list_by_addr: %s", e.reason),
+ getLogger(__func__)->error(Logr::Info, e.reason, "Error parsing address"));
return 0;
}
list->d_domains.push_back(domain.toString());
}
catch (const std::exception& e) {
- vinfolog("Error converting domain to string in dnsdist_ffi_packetcache_get_domain_list_by_addr: %s", e.what());
+ VERBOSESLOG(infolog("Error converting domain to string in dnsdist_ffi_packetcache_get_domain_list_by_addr: %s", e.what()),
+ getLogger(__func__)->error(Logr::Info, e.what(), "Error converting domain to string", "domain", Logging::Loggable(domain)));
}
}
name = DNSName(domain);
}
catch (const std::exception& e) {
- vinfolog("Error parsing domain passed to dnsdist_ffi_packetcache_get_address_list_by_domain: %s", e.what());
+ VERBOSESLOG(infolog("Error parsing domain passed to dnsdist_ffi_packetcache_get_address_list_by_domain: %s", e.what()),
+ getLogger(__func__)->error(Logr::Info, e.what(), "Error parsing domain parameter", "domain", Logging::Loggable(domain)));
return 0;
}
list->d_addresses.push_back(addr.toString());
}
catch (const std::exception& e) {
- vinfolog("Error converting address to string in dnsdist_ffi_packetcache_get_address_list_by_domain: %s", e.what());
+ VERBOSESLOG(infolog("Error converting address to string in dnsdist_ffi_packetcache_get_address_list_by_domain: %s", e.what()),
+ getLogger(__func__)->error(Logr::Info, e.what(), "Error parsing address to string", "address", Logging::Loggable(addr)));
}
}
ca = ComboAddress(addr);
}
catch (const std::exception& e) {
- vinfolog("Unable to convert address in dnsdist_ffi_ring_get_entries_by_addr: %s", e.what());
+ VERBOSESLOG(infolog("Unable to convert address in dnsdist_ffi_ring_get_entries_by_addr: %s", e.what()),
+ getLogger(__func__)->error(Logr::Info, e.what(), "Unable to parse address", "address", Logging::Loggable(addr)));
return 0;
}
catch (const PDNSException& e) {
- vinfolog("Unable to convert address in dnsdist_ffi_ring_get_entries_by_addr: %s", e.reason);
+ VERBOSESLOG(vinfolog("Unable to convert address in dnsdist_ffi_ring_get_entries_by_addr: %s", e.reason),
+ getLogger(__func__)->error(Logr::Info, e.reason, "Unable to parse address", "address", Logging::Loggable(addr)));
return 0;
}
return true;
}
catch (const std::exception& e) {
- vinfolog("Error creating a new network endpoint: %s", e.what());
+ VERBOSESLOG(infolog("Error creating a new network endpoint: %s", e.what()),
+ getLogger(__func__)->error(Logr::Info, e.what(), "Error creating a new network endpoint", "path", Logging::Loggable(std::string_view(path, pathSize))));
return false;
}
}
return true;
}
catch (const std::exception& e) {
- vinfolog("Error in dnsdist_ffi_dnspacket_parse: %s", e.what());
+ VERBOSESLOG(vinfolog("Error in dnsdist_ffi_dnspacket_parse: %s", e.what()),
+ getLogger(__func__)->error(Logr::Info, e.what(), "Error parsing DNS packet", "packet_size", Logging::Loggable(packetSize)));
}
catch (...) {
- vinfolog("Error in dnsdist_ffi_dnspacket_parse");
+ VERBOSESLOG(infolog("Error in dnsdist_ffi_dnspacket_parse"),
+ getLogger(__func__)->info(Logr::Info, "Error parsing DNS packet", "packet_size", Logging::Loggable(packetSize)));
}
return false;
}
return storage.size();
}
catch (const std::exception& e) {
- vinfolog("Error parsing DNSName via dnsdist_ffi_dnspacket_get_name_at_offset_raw: %s", e.what());
+ VERBOSESLOG(infolog("Error parsing DNSName via dnsdist_ffi_dnspacket_get_name_at_offset_raw: %s", e.what()),
+ getLogger(__func__)->error(Logr::Info, e.what(), "Error parsing DNS name", "packet_size", Logging::Loggable(packetSize), "offset", Logging::Loggable(offset)));
}
return 0;
}
clientIPCA = ComboAddress(address);
}
catch (const std::exception& exp) {
- errlog("dnsdist_ffi_dynamic_blocks_add: Unable to parse '%s': %s", address, exp.what());
+ SLOG(errlog("dnsdist_ffi_dynamic_blocks_add: Unable to parse '%s': %s", address, exp.what()),
+ getLogger(__func__)->error(Logr::Error, exp.what(), "Error parsing IP address", "address", Logging::Loggable(address)));
return false;
}
catch (const PDNSException& exp) {
- errlog("dnsdist_ffi_dynamic_blocks_add: Unable to parse '%s': %s", address, exp.reason);
+ SLOG(errlog("dnsdist_ffi_dynamic_blocks_add: Unable to parse '%s': %s", address, exp.reason),
+ getLogger(__func__)->error(Logr::Error, exp.reason, "Error parsing IP address", "address", Logging::Loggable(address)));
return false;
}
}
}
catch (const std::exception& exp) {
- errlog("Exception in dnsdist_ffi_dynamic_blocks_add: %s", exp.what());
+ SLOG(errlog("Exception in dnsdist_ffi_dynamic_blocks_add: %s", exp.what()),
+ getLogger(__func__)->error(Logr::Error, exp.what(), "Exception adding a dynamic rule", "address", Logging::Loggable(address)));
}
catch (const PDNSException& exp) {
- errlog("Exception in dnsdist_ffi_dynamic_blocks_add: %s", exp.reason);
+ SLOG(errlog("Exception in dnsdist_ffi_dynamic_blocks_add: %s", exp.reason),
+ getLogger(__func__)->error(Logr::Error, exp.reason, "Exception adding a dynamic rule", "address", Logging::Loggable(address)));
}
catch (...) {
- errlog("Exception in dnsdist_ffi_dynamic_blocks_add");
+ SLOG(errlog("Exception in dnsdist_ffi_dynamic_blocks_add"),
+ getLogger(__func__)->info(Logr::Error, "Unknown exception adding a dynamic rule", "address", Logging::Loggable(address)));
}
return false;
}
domain.makeUsLowerCase();
}
catch (const std::exception& exp) {
- errlog("dnsdist_ffi_dynamic_blocks_smt_add: Unable to parse '%s': %s", suffix, exp.what());
+ SLOG(errlog("dnsdist_ffi_dynamic_blocks_smt_add: Unable to parse '%s': %s", suffix, exp.what()),
+ getLogger(__func__)->error(Logr::Error, exp.what(), "Error parsing suffix", "suffix", Logging::Loggable(suffix)));
return false;
}
catch (const PDNSException& exp) {
- errlog("dnsdist_ffi_dynamic_blocks_smt_add: Unable to parse '%s': %s", suffix, exp.reason);
+ SLOG(errlog("dnsdist_ffi_dynamic_blocks_smt_add: Unable to parse '%s': %s", suffix, exp.reason),
+ getLogger(__func__)->error(Logr::Error, exp.reason, "Error parsing suffix", "suffix", Logging::Loggable(suffix)));
return false;
}
}
}
catch (const std::exception& exp) {
- errlog("Exception in dnsdist_ffi_dynamic_blocks_smt_add: %s", exp.what());
+ SLOG(errlog("Exception in dnsdist_ffi_dynamic_blocks_smt_add: %s", exp.what()),
+ getLogger(__func__)->error(Logr::Error, exp.what(), "Exception adding a dynamic SMT rule", "suffix", Logging::Loggable(suffix)));
}
catch (const PDNSException& exp) {
- errlog("Exception in dnsdist_ffi_dynamic_blocks_smt_add: %s", exp.reason);
+ SLOG(errlog("Exception in dnsdist_ffi_dynamic_blocks_smt_add: %s", exp.reason),
+ getLogger(__func__)->error(Logr::Error, exp.reason, "Exception adding a dynamic SMT rule", "suffix", Logging::Loggable(suffix)));
}
catch (...) {
- errlog("Exception in dnsdist_ffi_dynamic_blocks_smt_add");
+ SLOG(errlog("Exception in dnsdist_ffi_dynamic_blocks_smt_add"),
+ getLogger(__func__)->info(Logr::Error, "Unknown exception adding a dynamic SMT rule", "suffix", Logging::Loggable(suffix)));
+
}
return false;
}
return true;
}
catch (const std::exception& exp) {
- errlog("Exception in dnsdist_ffi_svc_record_parameters_new: %s", exp.what());
+ SLOG(errlog("Exception in dnsdist_ffi_svc_record_parameters_new: %s", exp.what()),
+ getLogger(__func__)->error(Logr::Error, exp.what(), "Exception creating SVC record parameter", "target_name", Logging::Loggable(targetName)));
}
catch (const PDNSException& exp) {
- errlog("Exception in dnsdist_ffi_svc_record_parameters_new: %s", exp.reason);
+ SLOG(errlog("Exception in dnsdist_ffi_svc_record_parameters_new: %s", exp.reason),
+ getLogger(__func__)->error(Logr::Error, exp.reason, "Exception creating SVC record parameter", "target_name", Logging::Loggable(targetName)));
}
catch (...) {
- errlog("Exception in dnsdist_ffi_svc_record_parameters_new");
+ SLOG(errlog("Exception in dnsdist_ffi_svc_record_parameters_new"),
+ getLogger(__func__)->info(Logr::Error, "Exception creating SVC record parameter", "target_name", Logging::Loggable(targetName)));
}
return false;
parameters->parameters.ipv4hints.emplace_back(ComboAddress(std::string(value, valueLen)));
}
catch (const std::exception& exp) {
- errlog("Exception in dnsdist_ffi_svc_record_parameters_add_ipv4_hint: %s", exp.what());
+ SLOG(errlog("Exception in dnsdist_ffi_svc_record_parameters_add_ipv4_hint: %s", exp.what()),
+ getLogger(__func__)->error(Logr::Error, exp.what(), "Exception adding IPv4 hint to SVC record", "value", Logging::Loggable(std::string_view(value, valueLen))));
+
}
catch (const PDNSException& exp) {
- errlog("Exception in dnsdist_ffi_svc_record_parameters_add_ipv4_hint: %s", exp.reason);
+ SLOG(errlog("Exception in dnsdist_ffi_svc_record_parameters_add_ipv4_hint: %s", exp.reason),
+ getLogger(__func__)->error(Logr::Error, exp.reason, "Exception adding IPv4 hint to SVC record", "value", Logging::Loggable(std::string_view(value, valueLen))));
}
catch (...) {
- errlog("Exception in dnsdist_ffi_svc_record_parameters_add_ipv4_hint");
+ SLOG(errlog("Exception in dnsdist_ffi_svc_record_parameters_add_ipv4_hint"),
+ getLogger(__func__)->info(Logr::Error, "Exception adding IPv4 hint to SVC record", "value", Logging::Loggable(std::string_view(value, valueLen))));
}
}
parameters->parameters.ipv6hints.emplace_back(ComboAddress(std::string(value, valueLen)));
}
catch (const std::exception& exp) {
- errlog("Exception in dnsdist_ffi_svc_record_parameters_add_ipv4_hint: %s", exp.what());
+ SLOG(errlog("Exception in dnsdist_ffi_svc_record_parameters_add_ipv6_hint: %s", exp.what()),
+ getLogger(__func__)->error(Logr::Error, exp.what(), "Exception adding IPv6 hint to SVC record", "value", Logging::Loggable(std::string_view(value, valueLen))));
}
catch (const PDNSException& exp) {
- errlog("Exception in dnsdist_ffi_svc_record_parameters_add_ipv4_hint: %s", exp.reason);
+ SLOG(errlog("Exception in dnsdist_ffi_svc_record_parameters_add_ipv6_hint: %s", exp.reason),
+ getLogger(__func__)->error(Logr::Error, exp.reason, "Exception adding IPv6 hint to SVC record", "value", Logging::Loggable(std::string_view(value, valueLen))));
}
catch (...) {
- errlog("Exception in dnsdist_ffi_svc_record_parameters_add_ipv4_hint");
+ SLOG(errlog("Exception in dnsdist_ffi_svc_record_parameters_add_ipv6_hint"),
+ getLogger(__func__)->info(Logr::Error, "Exception adding IPv6 hint to SVC record", "value", Logging::Loggable(std::string_view(value, valueLen))));
}
}
}
if (dnsQuestion->pbfWriter.valid()) {
- vinfolog("Error in dnsdist_ffi_dnsquestion_meta_begin_key: the previous key has not been ended");
+ VERBOSESLOG(infolog("Error in dnsdist_ffi_dnsquestion_meta_begin_key: the previous key has not been ended"),
+ getLogger(__func__)->info(Logr::Info, "Error beginning a new meta key: the previous key has not been ended"));
return;
}
}
if (!dnsQuestion->pbfMetaValueWriter.valid()) {
- vinfolog("Error in dnsdist_ffi_dnsquestion_meta_add_str_value_to_key: trying to add a value without starting a key");
+ VERBOSESLOG(infolog("Error in dnsdist_ffi_dnsquestion_meta_add_str_value_to_key: trying to add a value without starting a key"),
+ getLogger(__func__)->info(Logr::Info, "Error adding a new meta value: the key has not been started"));
return;
}
}
if (!dnsQuestion->pbfMetaValueWriter.valid()) {
- vinfolog("Error in dnsdist_ffi_dnsquestion_meta_add_int64_value_to_key: trying to add a value without starting a key");
+ VERBOSESLOG(infolog("Error in dnsdist_ffi_dnsquestion_meta_add_int64_value_to_key: trying to add a value without starting a key"),
+ getLogger(__func__)->info(Logr::Info, "Error adding a new meta value: the key has not been started"));
return;
}
}
if (!dnsQuestion->pbfWriter.valid()) {
- vinfolog("Error in dnsdist_ffi_dnsquestion_meta_end_key: trying to end a key that has not been started");
+ VERBOSESLOG(infolog("Error in dnsdist_ffi_dnsquestion_meta_end_key: trying to end a key that has not been started"),
+ getLogger(__func__)->info(Logr::Info, "Error ending meta key: the key has not been started"));
return;
}
dnsQuestion->pbfWriter = protozero::pbf_writer();
}
catch (const std::exception& exp) {
- vinfolog("Error in dnsdist_ffi_dnsquestion_meta_end_key: %s", exp.what());
+ VERBOSESLOG(infolog("Error in dnsdist_ffi_dnsquestion_meta_end_key: %s", exp.what()),
+ getLogger(__func__)->error(Logr::Error, exp.what(), "Exception while ending meta key"));
}
#endif /* DISABLE_PROTOBUF */
}
}
if (dnsResponse->pbfWriter.valid()) {
- vinfolog("Error in dnsdist_ffi_dnsresponse_meta_begin_key: the previous key has not been ended");
+ VERBOSESLOG(infolog("Error in dnsdist_ffi_dnsresponse_meta_begin_key: the previous key has not been ended"),
+ getLogger(__func__)->info(Logr::Info, "Error ending meta key for response : the previous key has not been ended"));
return;
}
}
if (!dnsResponse->pbfMetaValueWriter.valid()) {
- vinfolog("Error in dnsdist_ffi_dnsresponse_meta_add_str_value_to_key: trying to add a value without starting a key");
+ VERBOSESLOG(infolog("Error in dnsdist_ffi_dnsresponse_meta_add_str_value_to_key: trying to add a value without starting a key"),
+ getLogger(__func__)->info(Logr::Info, "Error adding meta value: the key has not been started"));
return;
}
}
if (!dnsResponse->pbfMetaValueWriter.valid()) {
- vinfolog("Error in dnsdist_ffi_dnsresponse_meta_add_int64_value_to_key: trying to add a value without starting a key");
+ VERBOSESLOG(infolog("Error in dnsdist_ffi_dnsresponse_meta_add_int64_value_to_key: trying to add a value without starting a key"),
+ getLogger(__func__)->info(Logr::Info, "Error adding meta value: the key has not been started"));
return;
}
}
if (!dnsResponse->pbfWriter.valid()) {
- vinfolog("Error in dnsdist_ffi_dnsresponse_meta_end_key: trying to end a key that has not been started");
+ VERBOSESLOG(infolog("Error in dnsdist_ffi_dnsresponse_meta_end_key: trying to end a key that has not been started"),
+ getLogger(__func__)->info(Logr::Info, "Error ending meta key: the key has not been started"));
return;
}
dnsResponse->pbfWriter = protozero::pbf_writer();
}
catch (const std::exception& exp) {
- vinfolog("Error in dnsdist_ffi_dnsresponse_meta_end_key: %s", exp.what());
+ VERBOSESLOG(infolog("Error in dnsdist_ffi_dnsresponse_meta_end_key: %s", exp.what()),
+ getLogger(__func__)->error(Logr::Error, exp.what(), "Exception while ending meta key"));
}
#endif /* DISABLE_PROTOBUF */
}