Update debug levels #29

Merged
dyfet merged 1 commits from :update-debug into master 1 year ago
  1. 12
      server/events.cpp
  2. 2
      server/registry.cpp

@ -258,7 +258,7 @@ void server::do_local(exosip::context_t& context, keyfile::keys config)
auto prior = util::steady_clock();
auto expires = prior;
logger::debug(5) << "binding local to " << address << ":" << port;
logger::debug(2) << "binding local to " << address << ":" << port;
context.set_family(ipv6 ? family_type::ipv6 : family_type::ipv4);
if(!context.listen(address, exosip::listen_type::udp, port))
logger::crit(98) << "cannot bind local to " << address << ":" << port;
@ -275,7 +275,7 @@ void server::do_local(exosip::context_t& context, keyfile::keys config)
// fast breakdown of local events without local scopes in switch
auto request = event.request();
if(is(event))
logger::debug(9) << "**** sip request";
logger::debug(5) << "**** sip request";
switch(event.type()) {
case EXOSIP_MESSAGE_NEW:
@ -296,14 +296,14 @@ void server::do_local(exosip::context_t& context, keyfile::keys config)
// make sure even on high load we call automatic ops ~twice a second
auto now = util::steady_clock();
if(!event || now > (prior + 500ms)) {
logger::debug(8) << "local events automatic";
logger::debug(4) << "local events automatic";
prior = event.created();
context.automatic();
}
// time tracking for expiring issued nonces...
if(now >= (expires + 5000ms) && !nonces.empty()) {
logger::debug(7) << "nonce expiration";
logger::debug(3) << "nonce expiration";
expires = now;
auto expired = now - 5000ms;
for(auto it = nonces.begin(); it != nonces.end();) {
@ -338,7 +338,7 @@ void server::do_remote(exosip::context_t& context, keyfile::keys config)
if(port != 5060)
from += ":" + std::to_string(port);
logger::debug(5) << "binding remote to " << address << ":" << port;
logger::debug(2) << "binding remote to " << address << ":" << port;
context.set_family(ipv6 ? family_type::ipv6 : family_type::ipv4);
context.srv_lookup(true);
if(!context.listen(address, listen_type::tcp, port))
@ -371,7 +371,7 @@ void server::do_remote(exosip::context_t& context, keyfile::keys config)
// make sure even on high load we call automatic ops ~twice a second
if(!event || util::steady_clock() > (prior + 500ms)) {
logger::debug(9) << "remote events automatic";
logger::debug(5) << "remote events automatic";
prior = event.created();
context.automatic();
}

@ -105,7 +105,7 @@ auto rescan() // fast sync compute...
time_t now{}, latest = 0;
time(&now);
logger::debug(3) << "registry timeout";
logger::debug(2) << "registry timeout";
for(auto& entry : mapped) {
auto expires = entry.expires();
if(!expires) // if already expired, ignore

Loading…
Cancel
Save