Bug 906990 - Part 4: Using more appropriate log-levels (r_log) for errors and other not-quite-right conditions. r=ekr
authorByron Campen [:bwc] <docfaraday@gmail.com>
Mon, 14 Oct 2013 10:55:50 -0700
changeset 165829 3b1c267db16cc69515fcdd7d136b693d6e824db4
parent 165828 572abeaaa0c06d5138aed2c6b46aaae64d9bb8e0
child 165830 9ba57b6051db4e538db6982269432dfaa2459810
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersekr
bugs906990
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 906990 - Part 4: Using more appropriate log-levels (r_log) for errors and other not-quite-right conditions. r=ekr
media/mtransport/third_party/nICEr/src/ice/ice_candidate.c
media/mtransport/third_party/nICEr/src/ice/ice_candidate_pair.c
media/mtransport/third_party/nICEr/src/ice/ice_component.c
media/mtransport/third_party/nICEr/src/ice/ice_ctx.c
media/mtransport/third_party/nICEr/src/ice/ice_media_stream.c
media/mtransport/third_party/nICEr/src/ice/ice_peer_ctx.c
media/mtransport/third_party/nICEr/src/ice/ice_socket.c
media/mtransport/third_party/nICEr/src/stun/addrs.c
media/mtransport/third_party/nICEr/src/stun/stun_build.c
media/mtransport/third_party/nICEr/src/stun/stun_client_ctx.c
media/mtransport/third_party/nICEr/src/stun/stun_codec.c
media/mtransport/third_party/nICEr/src/stun/stun_proc.c
media/mtransport/third_party/nICEr/src/stun/stun_server_ctx.c
media/mtransport/third_party/nICEr/src/stun/stun_util.c
media/mtransport/third_party/nICEr/src/stun/turn_client_ctx.c
--- a/media/mtransport/third_party/nICEr/src/ice/ice_candidate.c
+++ b/media/mtransport/third_party/nICEr/src/ice/ice_candidate.c
@@ -159,17 +159,17 @@ int nr_ice_candidate_create(nr_ice_ctx *
 
     if(r=nr_ice_get_foundation(ctx,cand))
       ABORT(r);
     if(r=nr_ice_candidate_compute_priority(cand))
       ABORT(r);
 
     TAILQ_FOREACH(tmp,&isock->candidates,entry_sock){
       if(cand->priority==tmp->priority){
-        r_log(LOG_ICE,LOG_WARNING,"ICE(%s): duplicate priority %u candidate %s and candidate %s",
+        r_log(LOG_ICE,LOG_ERR,"ICE(%s): duplicate priority %u candidate %s and candidate %s",
           ctx->label,cand->priority,cand->label,tmp->label);
       }
     }
 
     if(ctype==RELAYED)
       cand->u.relayed.turn_sock=osock;
 
 
@@ -360,17 +360,17 @@ int nr_ice_candidate_compute_priority(nr
       r_log(LOG_ICE,LOG_ERR,"Illegal type preference %d",type_preference);
 
     if(!cand->ctx->interface_prioritizer) {
       /* Prioritizer is not set, read from registry */
       if(r=NR_reg_get2_uchar(NR_ICE_REG_PREF_INTERFACE_PRFX,cand->base.ifname,
         &interface_preference)) {
         if (r==R_NOT_FOUND) {
           if (next_automatic_preference == 1) {
-            r_log(LOG_ICE,LOG_DEBUG,"Out of preference values. Can't assign one for interface %s",cand->base.ifname);
+            r_log(LOG_ICE,LOG_ERR,"Out of preference values. Can't assign one for interface %s",cand->base.ifname);
             ABORT(R_NOT_FOUND);
           }
           r_log(LOG_ICE,LOG_DEBUG,"Automatically assigning preference for interface %s->%d",cand->base.ifname,
             next_automatic_preference);
           if (r=NR_reg_set2_uchar(NR_ICE_REG_PREF_INTERFACE_PRFX,cand->base.ifname,next_automatic_preference)){
             ABORT(r);
           }
           interface_preference=next_automatic_preference;
@@ -461,26 +461,26 @@ int nr_ice_candidate_initialize(nr_ice_c
           nr_resolver_resource resource;
           resource.domain_name=cand->stun_server->u.dnsname.host;
           resource.port=cand->stun_server->u.dnsname.port;
           resource.stun_turn=protocol;
           resource.transport_protocol=IPPROTO_UDP;  /* We don't support TCP yet */
 
           /* Try to resolve */
           if(!cand->ctx->resolver) {
-            r_log(LOG_ICE, LOG_ERR, "Can't use DNS names without a resolver");
+            r_log(LOG_ICE, LOG_ERR, "ICE-CANDIDATE(%s): Can't use DNS names without a resolver", cand->label);
             ABORT(R_BAD_ARGS);
           }
 
           if(r=nr_resolver_resolve(cand->ctx->resolver,
                                    &resource,
                                    nr_ice_candidate_resolved_cb,
                                    (void *)cand,
                                    &cand->resolver_handle)){
-            r_log(LOG_ICE,LOG_ERR,"ICE-CANDIDATE(%s): Could not resolve domain name",cand->label);
+            r_log(LOG_ICE,LOG_ERR,"ICE-CANDIDATE(%s): Could not invoke DNS resolver",cand->label);
             ABORT(r);
           }
         }
         break;
       default:
         ABORT(R_INTERNAL);
     }
 
@@ -499,17 +499,17 @@ static int nr_ice_candidate_resolved_cb(
 
     cand->resolver_handle=0;
 
     if(addr){
       r_log(LOG_ICE,LOG_DEBUG,"ICE(%s): resolved candidate %s. addr=%s",
             cand->ctx->label,cand->label,addr->as_string);
     }
     else {
-      r_log(LOG_ICE,LOG_DEBUG,"ICE(%s): failed to resolve candidate %s.",
+      r_log(LOG_ICE,LOG_WARNING,"ICE(%s): failed to resolve candidate %s.",
             cand->ctx->label,cand->label);
       ABORT(R_NOT_FOUND);
     }
 
     /* Copy the address */
     if(r=nr_transport_addr_copy(&cand->stun_server_addr,addr))
       ABORT(r);
 
@@ -745,31 +745,31 @@ static void nr_ice_turn_allocated_cb(NR_
           cand2->state=NR_ICE_CAND_STATE_INITIALIZED;
           cand2->done_cb(0,0,cand2->cb_arg);
         }
 
         break;
 
     case NR_TURN_CLIENT_STATE_FAILED:
     case NR_TURN_CLIENT_STATE_CANCELLED:
-      r_log(NR_LOG_TURN, LOG_ERR,
+      r_log(NR_LOG_TURN, LOG_WARNING,
             "ICE-CANDIDATE(%s): nr_turn_allocated_cb called with state %d",
             cand->label, turn->state);
       /* This failed, so go to the next TURN server if there is one */
       ABORT(R_NOT_FOUND);
       break;
     default:
       assert(0); /* should never happen */
       ABORT(R_INTERNAL);
     }
 
     _status=0;
   abort:
     if(_status){
-      r_log(NR_LOG_TURN, LOG_ERR,
+      r_log(NR_LOG_TURN, LOG_WARNING,
             "ICE-CANDIDATE(%s): nr_turn_allocated_cb failed", cand->label);
       cand->state=NR_ICE_CAND_STATE_FAILED;
       cand->done_cb(0,0,cand->cb_arg);
 
       if(cand->u.relayed.srvflx_candidate){
         nr_ice_candidate *cand2=cand->u.relayed.srvflx_candidate;
 
         cand2->state=NR_ICE_CAND_STATE_FAILED;
--- a/media/mtransport/third_party/nICEr/src/ice/ice_candidate_pair.c
+++ b/media/mtransport/third_party/nICEr/src/ice/ice_candidate_pair.c
@@ -88,17 +88,17 @@ int nr_ice_candidate_pair_create(nr_ice_
     pair->priority=(MIN(o_priority, a_priority))<<32 |
       (MAX(o_priority, a_priority))<<1 | (o_priority > a_priority?0:1);
 
     /*
        TODO(bcampen@mozilla.com): Would be nice to log why this candidate was
        created (initial pair generation, triggered check, and new trickle
        candidate seem to be the possibilities here).
     */
-    r_log(LOG_ICE,LOG_DEBUG,"ICE(%s)/CAND-PAIR(%s): Pairing candidate %s (%x):%s (%x) priority=%llu (%llx)",pctx->ctx->label,pair->codeword,lcand->addr.as_string,lcand->priority,rcand->addr.as_string,rcand->priority,pair->priority,pair->priority);
+    r_log(LOG_ICE,LOG_INFO,"ICE(%s)/CAND-PAIR(%s): Pairing candidate %s (%x):%s (%x) priority=%llu (%llx)",pctx->ctx->label,pair->codeword,lcand->addr.as_string,lcand->priority,rcand->addr.as_string,rcand->priority,pair->priority,pair->priority);
 
     /* Foundation */
     if(r=nr_concat_strings(&pair->foundation,lcand->foundation,"|",
       rcand->foundation,NULL))
       ABORT(r);
 
     /* Compute the RTO per S 16 */
     RTO = MAX(100, (pctx->ctx->Ta * pctx->waiting_pairs));
@@ -197,17 +197,17 @@ static void nr_ice_candidate_pair_stun_c
        Just bail out */
     if(pair->state==NR_ICE_PAIR_STATE_SUCCEEDED)
       goto done;
 
     switch(pair->stun_client->state){
       case NR_STUN_CLIENT_STATE_FAILED:
         sres=pair->stun_client->response;
         if(sres && nr_stun_message_has_attribute(sres,NR_STUN_ATTR_ERROR_CODE,&attr)&&attr->u.error_code.number==487){
-          r_log(LOG_ICE,LOG_ERR,"ICE-PEER(%s)/CAND-PAIR(%s): detected role conflict. Switching to controlled",pair->pctx->label,pair->codeword);
+          r_log(LOG_ICE,LOG_INFO,"ICE-PEER(%s)/CAND-PAIR(%s): detected role conflict. Switching to controlled",pair->pctx->label,pair->codeword);
 
           pair->pctx->controlling=0;
 
           /* Only restart if we haven't tried this already */
           if(!pair->restart_controlled_cb_timer)
             NR_ASYNC_TIMER_SET(0,nr_ice_candidate_pair_restart_stun_controlled_cb,pair,&pair->restart_controlled_cb_timer);
 
           return;
@@ -216,37 +216,37 @@ static void nr_ice_candidate_pair_stun_c
       case NR_STUN_CLIENT_STATE_TIMED_OUT:
         nr_ice_candidate_pair_set_state(pair->pctx,pair,NR_ICE_PAIR_STATE_FAILED);
         break;
       case NR_STUN_CLIENT_STATE_DONE:
         /* make sure the addresses match up S 7.1.2.2 */
         response_src=&pair->stun_client->peer_addr;
         request_dst=&pair->remote->addr;
         if (nr_transport_addr_cmp(response_src,request_dst,NR_TRANSPORT_ADDR_CMP_MODE_ALL)){
-          r_log(LOG_ICE,LOG_DEBUG,"ICE-PEER(%s)/CAND-PAIR(%s): Peer address mismatch %s != %s",pair->pctx->label,pair->codeword,response_src->as_string,request_dst->as_string);
+          r_log(LOG_ICE,LOG_WARNING,"ICE-PEER(%s)/CAND-PAIR(%s): Peer address mismatch %s != %s",pair->pctx->label,pair->codeword,response_src->as_string,request_dst->as_string);
           nr_ice_candidate_pair_set_state(pair->pctx,pair,NR_ICE_PAIR_STATE_FAILED);
           break;
         }
         request_src=&pair->stun_client->my_addr;
         nr_socket_getaddr(pair->local->osock,&response_dst);
         if (nr_transport_addr_cmp(request_src,&response_dst,NR_TRANSPORT_ADDR_CMP_MODE_ALL)){
-          r_log(LOG_ICE,LOG_DEBUG,"ICE-PEER(%s)/CAND-PAIR(%s): Local address mismatch %s != %s",pair->pctx->label,pair->codeword,request_src->as_string,response_dst.as_string);
+          r_log(LOG_ICE,LOG_WARNING,"ICE-PEER(%s)/CAND-PAIR(%s): Local address mismatch %s != %s",pair->pctx->label,pair->codeword,request_src->as_string,response_dst.as_string);
           nr_ice_candidate_pair_set_state(pair->pctx,pair,NR_ICE_PAIR_STATE_FAILED);
           break;
         }
 
         if(strlen(pair->stun_client->results.ice_binding_response.mapped_addr.as_string)==0){
           /* we're using the mapped_addr returned by the server to lookup our
            * candidate, but if the server fails to do that we can't perform
            * the lookup -- this may be a BUG because if we've gotten here
            * then the transaction ID check succeeded, and perhaps we should
            * just assume that it's the server we're talking to and that our
            * peer is ok, but I'm not sure how that'll interact with the
            * peer reflexive logic below */
-          r_log(LOG_ICE,LOG_ERR,"ICE-PEER(%s)/CAND-PAIR(%s): server failed to return mapped address on pair %s", pair->pctx->label,pair->codeword,pair->as_string);
+          r_log(LOG_ICE,LOG_WARNING,"ICE-PEER(%s)/CAND-PAIR(%s): server failed to return mapped address on pair %s", pair->pctx->label,pair->codeword,pair->as_string);
           nr_ice_candidate_pair_set_state(pair->pctx,pair,NR_ICE_PAIR_STATE_FAILED);
           break;
         }
         else if(!nr_transport_addr_cmp(&pair->local->addr,&pair->stun_client->results.ice_binding_response.mapped_addr,NR_TRANSPORT_ADDR_CMP_MODE_ALL)){
           nr_ice_candidate_pair_set_state(pair->pctx,pair,NR_ICE_PAIR_STATE_SUCCEEDED);
         }
         else{
           /* OK, this didn't correspond to a pair on the check list, but
--- a/media/mtransport/third_party/nICEr/src/ice/ice_component.c
+++ b/media/mtransport/third_party/nICEr/src/ice/ice_component.c
@@ -204,17 +204,17 @@ int nr_ice_component_initialize(struct n
       else{
         if(suppress)
           continue;
       }
 
 
       r_log(LOG_ICE,LOG_DEBUG,"ICE(%s): host address %s",ctx->label,addrs[i].addr.as_string);
       if(r=nr_socket_local_create(&addrs[i].addr,&sock)){
-        r_log(LOG_ICE,LOG_DEBUG,"ICE(%s): couldn't create socket for address %s",ctx->label,addrs[i].addr.as_string);
+        r_log(LOG_ICE,LOG_WARNING,"ICE(%s): couldn't create socket for address %s",ctx->label,addrs[i].addr.as_string);
         continue;
       }
 
       if(r=nr_ice_socket_create(ctx,component,sock,&isock))
         ABORT(r);
 
       /* Create one host candidate */
       if(r=nr_ice_candidate_create(ctx,component,isock,sock,HOST,0,
@@ -297,17 +297,17 @@ int nr_ice_component_initialize(struct n
       STAILQ_INSERT_TAIL(&component->sockets,isock,entry);
     }
     isock=0;
 
 
     /* count the candidates that will be initialized */
     cand=TAILQ_FIRST(&component->candidates);
     if(!cand){
-      r_log(LOG_ICE,LOG_DEBUG,"ICE(%s): couldn't create any valid candidates",ctx->label);
+      r_log(LOG_ICE,LOG_WARNING,"ICE(%s): couldn't create any valid candidates",ctx->label);
       ABORT(R_NOT_FOUND);
     }
 
     while(cand){
       ctx->uninitialized_candidates++;
       cand=TAILQ_NEXT(cand,entry_comp);
     }
 
@@ -407,47 +407,47 @@ static int nr_ice_component_process_inco
 
     if (comp->state == NR_ICE_COMPONENT_DISABLED)
       ABORT(R_REJECTED);
 
     /* Check for role conficts (7.2.1.1) */
     if(comp->stream->pctx->controlling){
       if(nr_stun_message_has_attribute(sreq,NR_STUN_ATTR_ICE_CONTROLLING,&attr)){
         /* OK, there is a conflict. Who's right? */
-        r_log(LOG_ICE,LOG_ERR,"ICE-PEER(%s): role conflict, both controlling",comp->stream->pctx->label);
+        r_log(LOG_ICE,LOG_INFO,"ICE-PEER(%s): role conflict, both controlling",comp->stream->pctx->label);
 
         if(attr->u.ice_controlling > comp->stream->pctx->tiebreaker){
           /* They are: switch */
-          r_log(LOG_ICE,LOG_ERR,"ICE-PEER(%s): switching to controlled",comp->stream->pctx->label);
+          r_log(LOG_ICE,LOG_INFO,"ICE-PEER(%s): switching to controlled",comp->stream->pctx->label);
 
           comp->stream->pctx->controlling=0;
         }
         else {
           /* We are: throw an error */
-          r_log(LOG_ICE,LOG_ERR,"ICE-PEER(%s): returning 487 role conflict",comp->stream->pctx->label);
+          r_log(LOG_ICE,LOG_WARNING,"ICE-PEER(%s): returning 487 role conflict",comp->stream->pctx->label);
 
           *error=487;
           ABORT(R_REJECTED);
         }
       }
     }
     else{
       if(nr_stun_message_has_attribute(sreq,NR_STUN_ATTR_ICE_CONTROLLED,&attr)){
         /* OK, there is a conflict. Who's right? */
-        r_log(LOG_ICE,LOG_ERR,"ICE-PEER(%s): role conflict, both controlled",comp->stream->pctx->label);
+        r_log(LOG_ICE,LOG_INFO,"ICE-PEER(%s): role conflict, both controlled",comp->stream->pctx->label);
 
         if(attr->u.ice_controlling < comp->stream->pctx->tiebreaker){
-          r_log(LOG_ICE,LOG_ERR,"ICE-PEER(%s): switching to controlling",comp->stream->pctx->label);
+          r_log(LOG_ICE,LOG_INFO,"ICE-PEER(%s): switching to controlling",comp->stream->pctx->label);
 
           /* They are: switch */
           comp->stream->pctx->controlling=1;
         }
         else {
           /* We are: throw an error */
-          r_log(LOG_ICE,LOG_ERR,"ICE-PEER(%s): returning 487 role conflict",comp->stream->pctx->label);
+          r_log(LOG_ICE,LOG_WARNING,"ICE-PEER(%s): returning 487 role conflict",comp->stream->pctx->label);
 
           *error=487;
           ABORT(R_REJECTED);
         }
       }
     }
 
     r_log(LOG_ICE,LOG_DEBUG,"ICE-PEER(%s): This STUN request appears to map to local addr %s",comp->stream->pctx->label,local_addr->as_string);
@@ -509,17 +509,17 @@ static int nr_ice_component_process_inco
         }
 
         /* We now need to make a peer reflexive */
         if(r=nr_ice_peer_peer_rflx_candidate_create(comp->stream->pctx->ctx,"prflx",comp,&req->src_addr,&pcand)) {
           *error=(r==R_NO_MEMORY)?500:400;
           ABORT(r);
         }
         if(!nr_stun_message_has_attribute(sreq,NR_STUN_ATTR_PRIORITY,&attr)){
-          r_log(LOG_ICE,LOG_ERR,"ICE-PEER(%s): Rejecting stun request without priority",comp->stream->pctx->label);
+          r_log(LOG_ICE,LOG_WARNING,"ICE-PEER(%s): Rejecting stun request without priority",comp->stream->pctx->label);
           *error=487;
           ABORT(R_BAD_DATA);
         }
         pcand->priority=attr->u.priority;
         pcand->state=NR_ICE_CAND_PEER_CANDIDATE_PAIRED;;
         TAILQ_INSERT_TAIL(&comp->candidates,pcand,entry_comp);
 
         if(r=nr_ice_candidate_pair_create(comp->stream->pctx,cand,pcand,
@@ -538,33 +538,33 @@ static int nr_ice_component_process_inco
       }
       else{
         /* OK, there was a pair, it's just invalid: According to Section
            7.2.1.4, we need to resurrect it
         */
         if(found_invalid->state == NR_ICE_PAIR_STATE_FAILED){
           pair=found_invalid;
 
-          r_log(LOG_ICE,LOG_WARNING,"ICE-PEER(%s)/CAND-PAIR(%s): received STUN check on invalid pair, resurrecting: %s",comp->stream->pctx->label,pair->codeword,pair->as_string);
+          r_log(LOG_ICE,LOG_INFO,"ICE-PEER(%s)/CAND-PAIR(%s): received STUN check on invalid pair, resurrecting: %s",comp->stream->pctx->label,pair->codeword,pair->as_string);
           nr_ice_candidate_pair_set_state(pair->pctx,pair,NR_ICE_PAIR_STATE_WAITING);
         }
         else{
           /* This shouldn't happen */
           r_log(LOG_ICE,LOG_ERR,"ICE-PEER(%s)/CAND-PAIR(%s): received STUN check on invalid pair that was not in state FAILED; this should not happen: %s",comp->stream->pctx->label,pair->codeword,pair->as_string);
           *error=500;
           ABORT(R_BAD_DATA);
         }
       }
     }
 
     /* OK, we've got a pair to work with. Turn it on */
     assert(pair);
     if(nr_stun_message_has_attribute(sreq,NR_STUN_ATTR_USE_CANDIDATE,0)){
       if(comp->stream->pctx->controlling){
-        r_log(LOG_ICE,LOG_ERR,"ICE-PEER(%s)/CAND_PAIR(%s): Peer sent USE-CANDIDATE but is controlled",comp->stream->pctx->label, pair->codeword);
+        r_log(LOG_ICE,LOG_WARNING,"ICE-PEER(%s)/CAND_PAIR(%s): Peer sent USE-CANDIDATE but is controlled",comp->stream->pctx->label, pair->codeword);
       }
       else{
         /* If this is the first time we've noticed this is nominated...*/
         pair->peer_nominated=1;
 
         if(pair->state==NR_ICE_PAIR_STATE_SUCCEEDED && !pair->nominated){
           pair->nominated=1;
 
@@ -791,17 +791,17 @@ int nr_ice_component_nominated_pair(nr_i
     /* Are we changing what the nominated pair is? */
     if(comp->nominated){
       if(comp->nominated->priority > pair->priority)
         return(0);
       r_log(LOG_ICE,LOG_DEBUG,"ICE-PEER(%s)/STREAM(%s)/COMP(%d)/CAND-PAIR(%s): replacing pair %s with CAND-PAIR(%s)",comp->stream->pctx->label,comp->stream->label,comp->component_id,comp->nominated->codeword,comp->nominated->as_string,pair->codeword);
     }
 
     /* Set the new nominated pair */
-    r_log(LOG_ICE,LOG_DEBUG,"ICE-PEER(%s)/STREAM(%s)/COMP(%d)/CAND-PAIR(%s): nominated pair is %s",comp->stream->pctx->label,comp->stream->label,comp->component_id,pair->codeword,pair->as_string);
+    r_log(LOG_ICE,LOG_INFO,"ICE-PEER(%s)/STREAM(%s)/COMP(%d)/CAND-PAIR(%s): nominated pair is %s",comp->stream->pctx->label,comp->stream->label,comp->component_id,pair->codeword,pair->as_string);
     comp->state=NR_ICE_COMPONENT_NOMINATED;
     comp->nominated=pair;
     comp->active=pair;
 
     r_log(LOG_ICE,LOG_DEBUG,"ICE-PEER(%s)/STREAM(%s)/COMP(%d)/CAND-PAIR(%s): cancelling all pairs but %s",comp->stream->pctx->label,comp->stream->label,comp->component_id,pair->codeword,pair->as_string);
 
     /* Cancel checks in WAITING and FROZEN per ICE S 8.1.2 */
     p2=TAILQ_FIRST(&comp->stream->check_list);
--- a/media/mtransport/third_party/nICEr/src/ice/ice_ctx.c
+++ b/media/mtransport/third_party/nICEr/src/ice/ice_ctx.c
@@ -309,59 +309,59 @@ int nr_ice_ctx_create(char *label, UINT4
     if(r=nr_ice_random_string(buf,32))
       ABORT(r);
     if(!(ctx->pwd=r_strdup(buf)))
       ABORT(r);
 
     /* Get the STUN servers */
     if(r=NR_reg_get_child_count(NR_ICE_REG_STUN_SRV_PRFX,
       (unsigned int *)&ctx->stun_server_ct)||ctx->stun_server_ct==0) {
-      r_log(LOG_ICE,LOG_NOTICE,"No STUN servers specified");
+      r_log(LOG_ICE,LOG_WARNING,"ICE(%s): No STUN servers specified", ctx->label);
       ctx->stun_server_ct=0;
     }
 
     /* 255 is the max for our priority algorithm */
     if(ctx->stun_server_ct>255){
-      r_log(LOG_ICE,LOG_WARNING,"Too many STUN servers specified: max=255");
+      r_log(LOG_ICE,LOG_WARNING,"ICE(%s): Too many STUN servers specified: max=255", ctx->label);
       ctx->stun_server_ct=255;
     }
 
     if(ctx->stun_server_ct>0){
       if(r=nr_ice_fetch_stun_servers(ctx->stun_server_ct,&ctx->stun_servers)){
-        r_log(LOG_ICE,LOG_ERR,"Couldn't load STUN servers from registry");
+        r_log(LOG_ICE,LOG_ERR,"ICE(%s): Couldn't load STUN servers from registry", ctx->label);
         ctx->stun_server_ct=0;
         ABORT(r);
       }
     }
 
 #ifdef USE_TURN
     /* Get the TURN servers */
     if(r=NR_reg_get_child_count(NR_ICE_REG_TURN_SRV_PRFX,
       (unsigned int *)&ctx->turn_server_ct)||ctx->turn_server_ct==0) {
-      r_log(LOG_ICE,LOG_NOTICE,"No TURN servers specified");
+      r_log(LOG_ICE,LOG_NOTICE,"ICE(%s): No TURN servers specified", ctx->label);
       ctx->turn_server_ct=0;
     }
 #else
     ctx->turn_server_ct=0;
 #endif /* USE_TURN */
 
     ctx->local_addrs=0;
     ctx->local_addr_ct=0;
 
     /* 255 is the max for our priority algorithm */
     if((ctx->stun_server_ct+ctx->turn_server_ct)>255){
-      r_log(LOG_ICE,LOG_WARNING,"Too many STUN/TURN servers specified: max=255");
+      r_log(LOG_ICE,LOG_WARNING,"ICE(%s): Too many STUN/TURN servers specified: max=255", ctx->label);
       ctx->turn_server_ct=255-ctx->stun_server_ct;
     }
 
 #ifdef USE_TURN
     if(ctx->turn_server_ct>0){
       if(r=nr_ice_fetch_turn_servers(ctx->turn_server_ct,&ctx->turn_servers)){
         ctx->turn_server_ct=0;
-        r_log(LOG_ICE,LOG_ERR,"Couldn't load TURN servers from registry");
+        r_log(LOG_ICE,LOG_ERR,"ICE(%s): Couldn't load TURN servers from registry", ctx->label);
         ABORT(r);
       }
     }
 #endif /* USE_TURN */
 
 
     ctx->Ta = 20;
 
@@ -659,17 +659,17 @@ int nr_ice_ctx_deliver_packet(nr_ice_ctx
       r=nr_ice_peer_ctx_deliver_packet_maybe(pctx, comp, source_addr, data, len);
       if(!r)
         break;
 
       pctx=STAILQ_NEXT(pctx,entry);
     }
 
     if(!pctx)
-      r_log(LOG_ICE,LOG_INFO,"ICE(%s): Packet received from %s which doesn't match any known peer",ctx->label,source_addr->as_string);
+      r_log(LOG_ICE,LOG_WARNING,"ICE(%s): Packet received from %s which doesn't match any known peer",ctx->label,source_addr->as_string);
 
     return(0);
   }
 
 int nr_ice_ctx_is_known_id(nr_ice_ctx *ctx, UCHAR id[12])
   {
     nr_ice_stun_id *xid;
 
--- a/media/mtransport/third_party/nICEr/src/ice/ice_media_stream.c
+++ b/media/mtransport/third_party/nICEr/src/ice/ice_media_stream.c
@@ -163,17 +163,17 @@ int nr_ice_media_stream_get_attributes(n
 
           cand = TAILQ_NEXT(cand, entry_comp);
         }
       }
       comp=STAILQ_NEXT(comp,entry);
     }
 
     if(attrct < 1){
-      r_log(LOG_ICE,LOG_WARNING,"ICE-STREAM(%s): Failed to find any components for stream",stream->label);
+      r_log(LOG_ICE,LOG_ERR,"ICE-STREAM(%s): Failed to find any components for stream",stream->label);
       ABORT(R_FAILED);
     }
 
     /* Make the array we'll need */
     if(!(attrs=RCALLOC(sizeof(char *)*attrct)))
       ABORT(R_NO_MEMORY);
     for(index=0;index<attrct;index++){
       if(!(attrs[index]=RMALLOC(NR_ICE_MAX_ATTRIBUTE_SIZE)))
@@ -341,17 +341,17 @@ static void nr_ice_media_stream_check_ti
     nr_ice_cand_pair *pair;
     int timer_val;
 
     assert(stream->pctx->active_streams!=0);
 
     timer_val=stream->pctx->ctx->Ta*stream->pctx->active_streams;
 
     if (stream->ice_state == NR_ICE_MEDIA_STREAM_CHECKS_COMPLETED) {
-      r_log(LOG_ICE,LOG_DEBUG,"ICE-PEER(%s): bogus state for stream %s",stream->pctx->label,stream->label);
+      r_log(LOG_ICE,LOG_ERR,"ICE-PEER(%s): (bug) bogus state for stream %s",stream->pctx->label,stream->label);
     }
     assert(stream->ice_state != NR_ICE_MEDIA_STREAM_CHECKS_COMPLETED);
 
     r_log(LOG_ICE,LOG_DEBUG,"ICE-PEER(%s): check timer expired for media stream %s",stream->pctx->label,stream->label);
     stream->timer=0;
 
     /* Find the highest priority WAITING check and move it to RUNNING */
     pair=TAILQ_FIRST(&stream->check_list);
@@ -375,17 +375,17 @@ static void nr_ice_media_stream_check_ti
       }
     }
 
     if(pair){
       nr_ice_candidate_pair_start(pair->pctx,pair); /* Ignore failures */
       NR_ASYNC_TIMER_SET(timer_val,nr_ice_media_stream_check_timer_cb,cb_arg,&stream->timer);
     }
     else {
-      r_log(LOG_ICE,LOG_DEBUG,"ICE-PEER(%s): no pairs for %s",stream->pctx->label,stream->label);
+      r_log(LOG_ICE,LOG_WARNING,"ICE-PEER(%s): no pairs for %s",stream->pctx->label,stream->label);
     }
 
     _status=0;
   abort:
     return;
   }
 
 
--- a/media/mtransport/third_party/nICEr/src/ice/ice_peer_ctx.c
+++ b/media/mtransport/third_party/nICEr/src/ice/ice_peer_ctx.c
@@ -158,28 +158,28 @@ int nr_ice_peer_ctx_parse_stream_attribu
 static int nr_ice_peer_ctx_parse_stream_attributes_int(nr_ice_peer_ctx *pctx, nr_ice_media_stream *stream, nr_ice_media_stream *pstream, char **attrs, int attr_ct)
   {
     int r;
     int i;
 
     for(i=0;i<attr_ct;i++){
       if(!strncmp(attrs[i],"ice-",4)){
         if(r=nr_ice_peer_ctx_parse_media_stream_attribute(pctx,pstream,attrs[i])) {
-          r_log(LOG_ICE,LOG_ERR,"ICE(%s): peer (%s) specified bogus ICE attribute",pctx->ctx->label,pctx->label);
+          r_log(LOG_ICE,LOG_WARNING,"ICE(%s): peer (%s) specified bogus ICE attribute",pctx->ctx->label,pctx->label);
           continue;
         }
       }
       else if (!strncmp(attrs[i],"candidate",9)){
         if(r=nr_ice_ctx_parse_candidate(pctx,pstream,attrs[i])) {
-          r_log(LOG_ICE,LOG_ERR,"ICE(%s): peer (%s) specified bogus candidate",pctx->ctx->label,pctx->label);
+          r_log(LOG_ICE,LOG_WARNING,"ICE(%s): peer (%s) specified bogus candidate",pctx->ctx->label,pctx->label);
           continue;
         }
       }
       else {
-        r_log(LOG_ICE,LOG_ERR,"ICE(%s): peer (%s) specified bogus attribute",pctx->ctx->label,pctx->label);
+        r_log(LOG_ICE,LOG_WARNING,"ICE(%s): peer (%s) specified bogus attribute",pctx->ctx->label,pctx->label);
       }
     }
 
     /* Doesn't fail because we just skip errors */
     return(0);
   }
 
 static int nr_ice_ctx_parse_candidate(nr_ice_peer_ctx *pctx, nr_ice_media_stream *pstream, char *candidate)
@@ -201,26 +201,26 @@ static int nr_ice_ctx_parse_candidate(nr
     for(comp=STAILQ_FIRST(&pstream->components);comp;comp=STAILQ_NEXT(comp,entry)){
       if(j==cand->component_id)
         break;
 
       j++;
     }
 
     if(!comp){
-      r_log(LOG_ICE,LOG_ERR,"Peer answered with more components than we offered");
+      r_log(LOG_ICE,LOG_WARNING,"Peer answered with more components than we offered");
       ABORT(R_BAD_DATA);
     }
 
     if (comp->state == NR_ICE_COMPONENT_DISABLED) {
-      r_log(LOG_ICE,LOG_ERR,"Peer offered candidates for disabled remote component");
+      r_log(LOG_ICE,LOG_WARNING,"Peer offered candidates for disabled remote component");
       ABORT(R_BAD_DATA);
     }
     if (comp->local_component->state == NR_ICE_COMPONENT_DISABLED) {
-      r_log(LOG_ICE,LOG_ERR,"Peer offered candidates for disabled local component");
+      r_log(LOG_ICE,LOG_WARNING,"Peer offered candidates for disabled local component");
       ABORT(R_BAD_DATA);
     }
 
     cand->component=comp;
 
     TAILQ_INSERT_TAIL(&comp->candidates,cand,entry_comp);
 
     _status=0;
@@ -241,34 +241,34 @@ int nr_ice_peer_ctx_find_pstream(nr_ice_
      pstream=STAILQ_FIRST(&pctx->peer_streams);
      while(pstream) {
        if (pstream->local_stream == stream)
          break;
 
        pstream = STAILQ_NEXT(pstream, entry);
      }
      if (!pstream) {
-       r_log(LOG_ICE,LOG_ERR,"ICE(%s): peer (%s) has no stream matching stream %s",pctx->ctx->label,pctx->label,stream->label);
+       r_log(LOG_ICE,LOG_WARNING,"ICE(%s): peer (%s) has no stream matching stream %s",pctx->ctx->label,pctx->label,stream->label);
        ABORT(R_NOT_FOUND);
      }
 
     *pstreamp = pstream;
 
     _status=0;
  abort:
     return(_status);
   }
 
 int nr_ice_peer_ctx_parse_trickle_candidate(nr_ice_peer_ctx *pctx, nr_ice_media_stream *stream, char *candidate)
   {
     nr_ice_media_stream *pstream;
     int r,_status;
     int needs_pairing = 0;
 
-    r_log(LOG_ICE,LOG_ERR,"ICE(%s): peer (%s) parsing trickle ICE candidate %s",pctx->ctx->label,pctx->label,candidate);
+    r_log(LOG_ICE,LOG_DEBUG,"ICE(%s): peer (%s) parsing trickle ICE candidate %s",pctx->ctx->label,pctx->label,candidate);
     r = nr_ice_peer_ctx_find_pstream(pctx, stream, &pstream);
     if (r)
       ABORT(r);
 
     switch(pstream->ice_state) {
       case NR_ICE_MEDIA_STREAM_UNPAIRED:
         break;
       case NR_ICE_MEDIA_STREAM_CHECKS_FROZEN:
@@ -324,20 +324,20 @@ int nr_ice_peer_ctx_parse_trickle_candid
 
 
 int nr_ice_peer_ctx_pair_candidates(nr_ice_peer_ctx *pctx)
   {
     nr_ice_media_stream *stream;
     int r,_status;
 
 
-    r_log(LOG_ICE,LOG_ERR,"ICE(%s): peer (%s) pairing candidates",pctx->ctx->label,pctx->label);
+    r_log(LOG_ICE,LOG_DEBUG,"ICE(%s): peer (%s) pairing candidates",pctx->ctx->label,pctx->label);
 
     if(STAILQ_EMPTY(&pctx->peer_streams)) {
-        r_log(LOG_ICE,LOG_ERR,"ICE(%s): peer (%s) received no media stream attribributes",pctx->ctx->label,pctx->label);
+        r_log(LOG_ICE,LOG_ERR,"ICE(%s): peer (%s) received no media stream attributes",pctx->ctx->label,pctx->label);
         ABORT(R_FAILED);
     }
 
     stream=STAILQ_FIRST(&pctx->peer_streams);
     while(stream){
       if(r=nr_ice_media_stream_pair_candidates(pctx, stream->local_stream,
         stream))
         ABORT(r);
@@ -476,16 +476,20 @@ int nr_ice_peer_ctx_start_checks2(nr_ice
         r_log(LOG_ICE,LOG_ERR,"ICE(%s): peer (%s) first stream has empty check list",pctx->ctx->label,pctx->label);
         ABORT(R_FAILED);
       }
 
       stream=STAILQ_NEXT(stream, entry);
     }
 
     if (!stream) {
+      /*
+         We fail above if we aren't doing trickle, and this is not all that
+         unusual in the trickle case.
+       */
       r_log(LOG_ICE,LOG_NOTICE,"ICE(%s): peer (%s) no streams with non-empty check lists",pctx->ctx->label,pctx->label);
     }
     else if (stream->ice_state == NR_ICE_MEDIA_STREAM_CHECKS_FROZEN) {
       if(r=nr_ice_media_stream_unfreeze_pairs(pctx,stream))
         ABORT(r);
       if(r=nr_ice_media_stream_start_checks(pctx,stream))
         ABORT(r);
       ++started;
--- a/media/mtransport/third_party/nICEr/src/ice/ice_socket.c
+++ b/media/mtransport/third_party/nICEr/src/ice/ice_socket.c
@@ -57,17 +57,17 @@ static void nr_ice_socket_readable_cb(NR
     nr_socket *stun_srv_sock=sock->sock;
 
     r_log(LOG_ICE,LOG_DEBUG,"ICE(%s): Socket ready to read",sock->ctx->label);
 
     /* Re-arm first! */
     NR_ASYNC_WAIT(s,how,nr_ice_socket_readable_cb,cb_arg);
 
     if(r=nr_socket_recvfrom(sock->sock,buf,sizeof(buf),&len_s,0,&addr)){
-      r_log(LOG_ICE,LOG_ERR,"ICE(%s): Error reading from socket",sock->ctx->label);
+      r_log(LOG_ICE,LOG_WARNING,"ICE(%s): Error reading from socket",sock->ctx->label);
       return;
     }
 
     /* Deal with the fact that sizeof(int) and sizeof(size_t) may not
        be the same */
     if (len_s > (size_t)INT_MAX)
       return;
 
@@ -129,17 +129,17 @@ static void nr_ice_socket_readable_cb(NR
               if(!is_ind)
                 r=nr_turn_client_process_response(sc1->u.turn_client.turn_client,buf,len,&addr);
               else{
                 nr_transport_addr n_addr;
                 size_t n_len;
 
                 if (processed_indication) {
                   /* Don't allow recursively wrapped indications */
-                  r_log(LOG_ICE, LOG_ERR,
+                  r_log(LOG_ICE, LOG_WARNING,
                         "ICE(%s): discarding recursively wrapped indication",
                         sock->ctx->label);
                   break;
                 }
                 /* This is a bit of a hack. If it's a data indication, strip
                    off the TURN framing and re-enter. This works because
                    all STUN processing is on the same physical socket.
                    We don't care about other kinds of indication */
@@ -168,17 +168,17 @@ static void nr_ice_socket_readable_cb(NR
         }
 
         sc1=sc2;
       }
       if(!sc1){
         if (nr_ice_ctx_is_known_id(sock->ctx,((nr_stun_message_header*)buf)->id.octet))
             r_log(LOG_ICE,LOG_DEBUG,"ICE(%s): Message is a retransmit",sock->ctx->label);
         else
-            r_log(LOG_ICE,LOG_DEBUG,"ICE(%s): Message does not correspond to any registered stun ctx",sock->ctx->label);
+            r_log(LOG_ICE,LOG_NOTICE,"ICE(%s): Message does not correspond to any registered stun ctx",sock->ctx->label);
       }
     }
     else{
       r_log(LOG_ICE,LOG_DEBUG,"ICE(%s): Message is not STUN",sock->ctx->label);
 
       nr_ice_ctx_deliver_packet(sock->ctx, sock->component, &addr, buf, len);
     }
 
--- a/media/mtransport/third_party/nICEr/src/stun/addrs.c
+++ b/media/mtransport/third_party/nICEr/src/stun/addrs.c
@@ -164,17 +164,17 @@ stun_grab_addrs(char *name, int addrcoun
     struct ifreq ifr;
     struct rt_addrinfo info;
     struct sockaddr_in *sin;
 
     ifr.ifr_addr.sa_family = AF_INET;
     strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
 
     if ((s = socket(ifr.ifr_addr.sa_family, SOCK_DGRAM, 0)) < 0) {
-      r_log(NR_LOG_STUN, LOG_WARNING, "unable to obtain addresses from socket");
+      r_log(NR_LOG_STUN, LOG_ERR, "unable to obtain addresses from socket");
       ABORT(R_FAILED);
     }
 
     while (addrcount > 0) {
         info.rti_addrs = ifam->ifam_addrs;
 
         /* Expand the compacted addresses */
         stun_rt_xaddrs((char *)(ifam + 1), ifam->ifam_msglen + (char *)ifam, &info);
--- a/media/mtransport/third_party/nICEr/src/stun/stun_build.c
+++ b/media/mtransport/third_party/nICEr/src/stun/stun_build.c
@@ -360,32 +360,32 @@ nr_stun_build_auth_params(nr_stun_client
 
   if (r=nr_stun_compute_lt_message_integrity_password(auth->username,
                                                       auth->realm,
                                                       &auth->password,
                                                       &hmac_key))
     ABORT(r);
 
   if (!auth->username) {
-    r_log(NR_LOG_STUN, LOG_ERR, "STUN authentication requested but no username provided");
+    r_log(NR_LOG_STUN, LOG_WARNING, "STUN authentication requested but no username provided");
     ABORT(R_INTERNAL);
   }
 
   if (!auth->password.len) {
-    r_log(NR_LOG_STUN, LOG_ERR, "STUN authentication requested but no password provided");
+    r_log(NR_LOG_STUN, LOG_WARNING, "STUN authentication requested but no password provided");
     ABORT(R_INTERNAL);
   }
 
   if (!auth->realm) {
-    r_log(NR_LOG_STUN, LOG_ERR, "STUN authentication requested but no realm provided");
+    r_log(NR_LOG_STUN, LOG_WARNING, "STUN authentication requested but no realm provided");
     ABORT(R_INTERNAL);
   }
 
   if (!auth->nonce) {
-    r_log(NR_LOG_STUN, LOG_ERR, "STUN authentication requested but no nonce provided");
+    r_log(NR_LOG_STUN, LOG_WARNING, "STUN authentication requested but no nonce provided");
     ABORT(R_INTERNAL);
   }
 
   if ((r=nr_stun_message_add_username_attribute(req, auth->username)))
     ABORT(r);
 
   if ((r=nr_stun_message_add_realm_attribute(req, auth->realm)))
     ABORT(r);
@@ -573,17 +573,17 @@ nr_stun_form_error_response(nr_stun_mess
 {
     char *str;
     int request_method;
     char server_name[NR_STUN_MAX_SERVER_BYTES+1]; /* +1 for \0 */
 
     if (number < 300 || number > 699)
         number = 500;
 
-    r_log(NR_LOG_STUN, LOG_DEBUG, "Responding with error %d: %s", number, msg);
+    r_log(NR_LOG_STUN, LOG_INFO, "Responding with error %d: %s", number, msg);
 
     request_method = NR_STUN_GET_TYPE_METHOD(req->header.type);
     res->header.type = NR_STUN_TYPE(request_method, NR_CLASS_ERROR_RESPONSE);
     res->header.magic_cookie = req->header.magic_cookie;
     memcpy(&res->header.id, &req->header.id, sizeof(res->header.id));
 
     /* during development we should never see 500s (hopefully not in deployment either) */
 
--- a/media/mtransport/third_party/nICEr/src/stun/stun_client_ctx.c
+++ b/media/mtransport/third_party/nICEr/src/stun/stun_client_ctx.c
@@ -212,17 +212,17 @@ static void nr_stun_client_timer_expired
     if (r_timeval_diff_ms(&now, &ctx->timer_set, &ms_waited)) {
         r_log(NR_LOG_STUN,LOG_DEBUG,"STUN-CLIENT(%s): Timer expired",ctx->label);
     }
     else {
         r_log(NR_LOG_STUN,LOG_DEBUG,"STUN-CLIENT(%s): Timer expired (after %llu ms)",ctx->label, ms_waited);
     }
 
     if (ctx->request_ct >= ctx->maximum_transmits) {
-        r_log(NR_LOG_STUN,LOG_DEBUG,"STUN-CLIENT(%s): Timed out",ctx->label);
+        r_log(NR_LOG_STUN,LOG_INFO,"STUN-CLIENT(%s): Timed out",ctx->label);
         ctx->state=NR_STUN_CLIENT_STATE_TIMED_OUT;
         ABORT(R_FAILED);
     }
 
     if (ctx->state != NR_STUN_CLIENT_STATE_RUNNING)
         ABORT(R_NOT_PERMITTED);
 
     /* as a side effect will reset the timer */
@@ -252,17 +252,17 @@ static void nr_stun_client_timer_expired
 int nr_stun_client_force_retransmit(nr_stun_client_ctx *ctx)
   {
     int r,_status;
 
     if (ctx->state != NR_STUN_CLIENT_STATE_RUNNING)
         ABORT(R_NOT_PERMITTED);
 
     if (ctx->request_ct > ctx->maximum_transmits) {
-        r_log(NR_LOG_STUN,LOG_DEBUG,"STUN-CLIENT(%s): Too many retransmit attempts",ctx->label);
+        r_log(NR_LOG_STUN,LOG_INFO,"STUN-CLIENT(%s): Too many retransmit attempts",ctx->label);
         ABORT(R_FAILED);
     }
 
     /* if there is a scheduled retransimt, get rid of the scheduled retransmit
      * and retransmit immediately */
     if (ctx->timer_handle) {
         NR_async_timer_cancel(ctx->timer_handle);
         ctx->timer_handle=0;
@@ -513,17 +513,17 @@ int nr_stun_client_process_response(nr_s
       }
       password = &hmac_key;
     }
 
     if ((r=nr_stun_message_create2(&ctx->response, msg, len)))
         ABORT(r);
 
     if ((r=nr_stun_decode_message(ctx->response, nr_stun_client_get_password, password))) {
-        r_log(NR_LOG_STUN,LOG_DEBUG,"STUN-CLIENT(%s): error decoding response",ctx->label);
+        r_log(NR_LOG_STUN,LOG_WARNING,"STUN-CLIENT(%s): error decoding response",ctx->label);
         ABORT(r);
     }
 
     /* This will return an error if request and response don't match,
        which is how we reject responses that match other contexts. */
     if ((r=nr_stun_receive_message(ctx->request, ctx->response))) {
         r_log(NR_LOG_STUN,LOG_DEBUG,"STUN-CLIENT(%s): error receiving response",ctx->label);
         ABORT(r);
@@ -582,17 +582,17 @@ int nr_stun_client_process_response(nr_s
 
         mapped_addr = &ctx->results.stun_binding_response.mapped_addr;
         break;
 
     case NR_STUN_CLIENT_MODE_BINDING_REQUEST_NO_AUTH:
         if (! nr_stun_message_has_attribute(ctx->response, NR_STUN_ATTR_XOR_MAPPED_ADDRESS, 0)) {
             if (nr_stun_message_has_attribute(ctx->response, NR_STUN_ATTR_MAPPED_ADDRESS, 0)) {
               /* Compensate for a bug in Google's STUN servers where they always respond with MAPPED-ADDRESS */
-              r_log(NR_LOG_STUN,LOG_DEBUG,"STUN-CLIENT(%s): No XOR-MAPPED-ADDRESS but MAPPED-ADDRESS. Falling back (though server is wrong).", ctx->label);
+              r_log(NR_LOG_STUN,LOG_INFO,"STUN-CLIENT(%s): No XOR-MAPPED-ADDRESS but MAPPED-ADDRESS. Falling back (though server is wrong).", ctx->label);
             }
             else {
               ABORT(R_BAD_DATA);
             }
         }
 
         mapped_addr = &ctx->results.stun_binding_response.mapped_addr;
         break;
--- a/media/mtransport/third_party/nICEr/src/stun/stun_codec.c
+++ b/media/mtransport/third_party/nICEr/src/stun/stun_codec.c
@@ -714,17 +714,17 @@ nr_stun_attr_codec_fingerprint_decode(nr
         r_log(NR_LOG_STUN, LOG_WARNING, "Unable to compute fingerprint");
         ABORT(R_FAILED);
     }
 
     fingerprint->valid = (fingerprint->checksum == (checksum ^ 0x5354554e));
 
     r_log(NR_LOG_STUN, LOG_DEBUG, "Computed FINGERPRINT %08x", (checksum ^ 0x5354554e));
     if (! fingerprint->valid)
-        r_log(NR_LOG_STUN, LOG_DEBUG, "Invalid FINGERPRINT %08x", fingerprint->checksum);
+        r_log(NR_LOG_STUN, LOG_WARNING, "Invalid FINGERPRINT %08x", fingerprint->checksum);
 
     _status=0;
   abort:
     return _status;
 }
 
 nr_stun_attr_codec nr_stun_attr_codec_fingerprint = {
     "fingerprint",
@@ -1306,17 +1306,17 @@ nr_stun_encode_message(nr_stun_message *
     r_log(NR_LOG_STUN, LOG_DEBUG, "Encoded Cookie: %08x", msg->header.magic_cookie);
 
     if ((r=nr_stun_encode((UCHAR*)(&msg->header.id), sizeof(msg->header.id), sizeof(msg->buffer), msg->buffer, &msg->length)))
         ABORT(r);
     r_dump(NR_LOG_STUN, LOG_DEBUG, "Encoded ID", (void*)&msg->header.id, sizeof(msg->header.id));
 
     TAILQ_FOREACH(attr, &msg->attributes, entry) {
         if ((r=nr_stun_find_attr_info(attr->type, &attr_info))) {
-            r_log(NR_LOG_STUN, LOG_DEBUG, "Unrecognized attribute: 0x%04x", attr->type);
+            r_log(NR_LOG_STUN, LOG_WARNING, "Unrecognized attribute: 0x%04x", attr->type);
             ABORT(R_INTERNAL);
         }
 
         attr_info->name = attr_info->name;
         attr->type_name = attr_info->codec->name;
         attr->encoding = (nr_stun_encoded_attribute*)&msg->buffer[msg->length];
 
         if (attr_info->codec->encode != 0) {
@@ -1440,17 +1440,17 @@ nr_stun_decode_message(nr_stun_message *
            ABORT(R_FAILED);
         }
 
         if ((r=nr_stun_find_attr_info(attr->type, &attr_info))) {
             if (attr->type <= 0x7FFF)
                 ++msg->comprehension_required_unknown_attributes;
             else
                 ++msg->comprehension_optional_unknown_attributes;
-            r_log(NR_LOG_STUN, LOG_DEBUG, "Unrecognized attribute: 0x%04x", attr->type);
+            r_log(NR_LOG_STUN, LOG_INFO, "Unrecognized attribute: 0x%04x", attr->type);
         }
         else {
             attr_info->name = attr_info->name;
             attr->type_name = attr_info->codec->name;
 
             if (attr->type == NR_STUN_ATTR_MESSAGE_INTEGRITY) {
                 if (get_password && get_password(arg, msg, &password) == 0) {
                     if (password->len > sizeof(attr->u.message_integrity.password)) {
@@ -1463,17 +1463,17 @@ nr_stun_decode_message(nr_stun_message *
                 }
                 else {
                     /* set to user "not found" */
                     attr->u.message_integrity.unknown_user = 1;
                 }
             }
             else if (attr->type == NR_STUN_ATTR_OLD_XOR_MAPPED_ADDRESS) {
                 attr->type = NR_STUN_ATTR_XOR_MAPPED_ADDRESS;
-                r_log(NR_LOG_STUN, LOG_DEBUG, "Translating obsolete XOR-MAPPED-ADDRESS type");
+                r_log(NR_LOG_STUN, LOG_INFO, "Translating obsolete XOR-MAPPED-ADDRESS type");
             }
 
             if ((r=attr_info->codec->decode(attr_info, attr->length, msg->buffer, offset+4, msg->length, &attr->u))) {
                 if (r == SKIP_ATTRIBUTE_DECODE) {
                     r_log(NR_LOG_STUN, LOG_INFO, "Skipping %s", attr_info->name);
                 }
                 else {
                     r_log(NR_LOG_STUN, LOG_WARNING, "Unable to parse %s", attr_info->name);
@@ -1483,17 +1483,17 @@ nr_stun_decode_message(nr_stun_message *
             }
             else {
                 attr_info->codec->print(attr_info, "Parsed", &attr->u);
 
 #ifdef USE_STUN_PEDANTIC
                 r_log(NR_LOG_STUN, LOG_DEBUG, "Before pedantic attr_info checks");
                 if (attr_info->illegal) {
                     if ((r=attr_info->illegal(attr_info, attr->length, &attr->u))) {
-                        r_log(NR_LOG_STUN, LOG_DEBUG, "Failed pedantic attr_info checks");
+                        r_log(NR_LOG_STUN, LOG_WARNING, "Failed pedantic attr_info checks");
                         ABORT(r);
                     }
                 }
                 r_log(NR_LOG_STUN, LOG_DEBUG, "After pedantic attr_info checks");
 #endif /* USE_STUN_PEDANTIC */
             }
         }
 
--- a/media/mtransport/third_party/nICEr/src/stun/stun_proc.c
+++ b/media/mtransport/third_party/nICEr/src/stun/stun_proc.c
@@ -63,54 +63,54 @@ nr_stun_receive_message(nr_stun_message 
 #ifdef USE_RFC_3489_BACKWARDS_COMPATIBLE
     /* if this message was generated by an RFC 3489 impementation,
      * the call to nr_is_stun_message will fail, so skip that
      * check and puke elsewhere if the message can't be decoded */
     if (msg->header.magic_cookie == NR_STUN_MAGIC_COOKIE
      || msg->header.magic_cookie == NR_STUN_MAGIC_COOKIE2) {
 #endif /* USE_RFC_3489_BACKWARDS_COMPATIBLE */
     if (!nr_is_stun_message(msg->buffer, msg->length)) {
-        r_log(NR_LOG_STUN, LOG_DEBUG, "Not a STUN message");
+        r_log(NR_LOG_STUN, LOG_WARNING, "Not a STUN message");
         ABORT(R_REJECTED);
     }
 #ifdef USE_RFC_3489_BACKWARDS_COMPATIBLE
     }
 #endif /* USE_RFC_3489_BACKWARDS_COMPATIBLE */
 
     if (req == 0) {
         if (NR_STUN_GET_TYPE_CLASS(msg->header.type) != NR_CLASS_REQUEST) {
-            r_log(NR_LOG_STUN,LOG_NOTICE,"Illegal message type: %03x", msg->header.type);
+            r_log(NR_LOG_STUN,LOG_WARNING,"Illegal message type: %03x", msg->header.type);
             ABORT(R_REJECTED);
         }
     }
     else {
         if (NR_STUN_GET_TYPE_CLASS(msg->header.type) != NR_CLASS_RESPONSE
          && NR_STUN_GET_TYPE_CLASS(msg->header.type) != NR_CLASS_ERROR_RESPONSE) {
-            r_log(NR_LOG_STUN,LOG_NOTICE,"Illegal message class: %03x", msg->header.type);
+            r_log(NR_LOG_STUN,LOG_WARNING,"Illegal message class: %03x", msg->header.type);
             ABORT(R_REJECTED);
         }
 
         if (NR_STUN_GET_TYPE_METHOD(req->header.type) != NR_STUN_GET_TYPE_METHOD(msg->header.type)) {
-            r_log(NR_LOG_STUN,LOG_NOTICE,"Inconsistent message method: %03x expected %03x", msg->header.type, req->header.type);
+            r_log(NR_LOG_STUN,LOG_WARNING,"Inconsistent message method: %03x expected %03x", msg->header.type, req->header.type);
             ABORT(R_REJECTED);
         }
 
         if (nr_stun_different_transaction(msg->buffer, msg->length, req)) {
             r_log(NR_LOG_STUN, LOG_DEBUG, "Unrecognized STUN transaction");
             ABORT(R_REJECTED);
         }
     }
 
     switch (msg->header.magic_cookie) {
     case NR_STUN_MAGIC_COOKIE:
         /* basically draft-ietf-behave-rfc3489bis-10.txt S 6 rules */
 
         if (nr_stun_message_has_attribute(msg, NR_STUN_ATTR_FINGERPRINT, &attr)
          && !attr->u.fingerprint.valid) {
-            r_log(NR_LOG_STUN, LOG_DEBUG, "Invalid fingerprint");
+            r_log(NR_LOG_STUN, LOG_WARNING, "Invalid fingerprint");
             ABORT(R_REJECTED);
         }
 
         break;
 
 #ifdef USE_STUND_0_96
     case NR_STUN_MAGIC_COOKIE2:
         /* nothing to check in this case */
@@ -118,17 +118,17 @@ nr_stun_receive_message(nr_stun_message 
 #endif /* USE_STUND_0_96 */
 
     default:
 #ifdef USE_RFC_3489_BACKWARDS_COMPATIBLE
         /* in RFC 3489 there is no magic cookie, it's part of the transaction ID */
 #else
 #ifdef NDEBUG
         /* in deployment builds we should always see a recognized magic cookie */
-        r_log(NR_LOG_STUN, LOG_ERR, "Missing Magic Cookie");
+        r_log(NR_LOG_STUN, LOG_WARNING, "Missing Magic Cookie");
         ABORT(R_REJECTED);
 #else
         /* ignore this condition because sometimes we like to pretend we're
          * a server talking to old clients and their messages don't contain
          * a magic cookie at all but rather the magic cookie field is part
          * of their ID and therefore random */
 #endif /* NDEBUG */
 #endif /* USE_RFC_3489_BACKWARDS_COMPATIBLE */
@@ -213,17 +213,17 @@ nr_stun_process_success_response(nr_stun
 #ifdef USE_STUN_PEDANTIC
     if (res->comprehension_required_unknown_attributes > 0)
         ABORT(R_REJECTED);
 #endif /* USE_STUN_PEDANTIC */
 
     if (NR_STUN_GET_TYPE_METHOD(res->header.type) == NR_METHOD_BINDING) {
         if (! nr_stun_message_has_attribute(res, NR_STUN_ATTR_XOR_MAPPED_ADDRESS, 0) &&
             ! nr_stun_message_has_attribute(res, NR_STUN_ATTR_MAPPED_ADDRESS, 0)) {
-            r_log(NR_LOG_STUN, LOG_ERR, "Missing XOR-MAPPED-ADDRESS and MAPPED_ADDRESS");
+            r_log(NR_LOG_STUN, LOG_WARNING, "Missing XOR-MAPPED-ADDRESS and MAPPED_ADDRESS");
             ABORT(R_REJECTED);
         }
     }
 
     _status=0;
  abort:
     return _status;
 }
@@ -235,37 +235,37 @@ nr_stun_process_error_response(nr_stun_m
     int _status;
     nr_stun_message_attribute *attr;
 
     if (res->comprehension_required_unknown_attributes > 0) {
         ABORT(R_REJECTED);
     }
 
     if (! nr_stun_message_has_attribute(res, NR_STUN_ATTR_ERROR_CODE, &attr)) {
-        r_log(NR_LOG_STUN, LOG_ERR, "Missing ERROR-CODE");
+        r_log(NR_LOG_STUN, LOG_WARNING, "Missing ERROR-CODE");
         ABORT(R_REJECTED);
     }
 
     *error_code = attr->u.error_code.number;
 
     switch (attr->u.error_code.number / 100) {
     case 3:
         /* If the error code is 300 through 399, the client SHOULD consider
          * the transaction as failed unless the ALTERNATE-SERVER extension is
          * being used.  See Section 11. */
 
         if (attr->u.error_code.number == 300) {
             if (!nr_stun_message_has_attribute(res, NR_STUN_ATTR_ALTERNATE_SERVER, 0)) {
-                r_log(NR_LOG_STUN, LOG_ERR, "Missing ALTERNATE-SERVER");
+                r_log(NR_LOG_STUN, LOG_WARNING, "Missing ALTERNATE-SERVER");
                 ABORT(R_REJECTED);
             }
 
             /* draft-ietf-behave-rfc3489bis-10.txt S 11 */
             if (!nr_stun_message_has_attribute(res, NR_STUN_ATTR_MESSAGE_INTEGRITY, 0)) {
-                r_log(NR_LOG_STUN, LOG_ERR, "Missing MESSAGE-INTEGRITY");
+                r_log(NR_LOG_STUN, LOG_WARNING, "Missing MESSAGE-INTEGRITY");
                 ABORT(R_REJECTED);
             }
 
             ABORT(R_RETRY);
         }
 
         ABORT(R_REJECTED);
         break;
@@ -360,22 +360,22 @@ nr_stun_receive_response_short_term_auth
     nr_stun_message_attribute *attr;
 
     switch (res->header.magic_cookie) {
     default:
         /* in RFC 3489 there is no magic cookie, it's part of the transaction ID */
         /* drop thru */
     case NR_STUN_MAGIC_COOKIE:
         if (!nr_stun_message_has_attribute(res, NR_STUN_ATTR_MESSAGE_INTEGRITY, &attr)) {
-            r_log(NR_LOG_STUN, LOG_DEBUG, "Missing MESSAGE-INTEGRITY");
+            r_log(NR_LOG_STUN, LOG_WARNING, "Missing MESSAGE-INTEGRITY");
             ABORT(R_REJECTED);
         }
 
         if (!attr->u.message_integrity.valid) {
-            r_log(NR_LOG_STUN, LOG_DEBUG, "Bad MESSAGE-INTEGRITY");
+            r_log(NR_LOG_STUN, LOG_WARNING, "Bad MESSAGE-INTEGRITY");
             ABORT(R_REJECTED);
         }
 
         break;
 
 #ifdef USE_STUND_0_96
     case NR_STUN_MAGIC_COOKIE2:
         /* nothing to check in this case */
@@ -525,34 +525,34 @@ nr_stun_receive_response_long_term_auth(
     case NR_STUN_MAGIC_COOKIE:
         if (nr_stun_message_has_attribute(res, NR_STUN_ATTR_REALM, &attr)) {
             RFREE(ctx->realm);
             ctx->realm = r_strdup(attr->u.realm);
             if (!ctx->realm)
                 ABORT(R_NO_MEMORY);
         }
         else {
-            r_log(NR_LOG_STUN, LOG_DEBUG, "Missing REALM");
+            r_log(NR_LOG_STUN, LOG_WARNING, "Missing REALM");
             ABORT(R_REJECTED);
         }
 
         if (nr_stun_message_has_attribute(res, NR_STUN_ATTR_NONCE, &attr)) {
             RFREE(ctx->nonce);
             ctx->nonce = r_strdup(attr->u.nonce);
             if (!ctx->nonce)
                 ABORT(R_NO_MEMORY);
         }
         else {
-            r_log(NR_LOG_STUN, LOG_DEBUG, "Missing NONCE");
+            r_log(NR_LOG_STUN, LOG_WARNING, "Missing NONCE");
             ABORT(R_REJECTED);
         }
 
         if (nr_stun_message_has_attribute(res, NR_STUN_ATTR_MESSAGE_INTEGRITY, &attr)) {
             if (!attr->u.message_integrity.valid) {
-                r_log(NR_LOG_STUN, LOG_DEBUG, "Bad MESSAGE-INTEGRITY");
+                r_log(NR_LOG_STUN, LOG_WARNING, "Bad MESSAGE-INTEGRITY");
                 ABORT(R_REJECTED);
             }
         }
 
         break;
 
 #ifdef USE_STUND_0_96
     case NR_STUN_MAGIC_COOKIE2:
--- a/media/mtransport/third_party/nICEr/src/stun/stun_server_ctx.c
+++ b/media/mtransport/third_party/nICEr/src/stun/stun_server_ctx.c
@@ -178,17 +178,17 @@ static int nr_stun_server_get_password(v
   {
     int _status;
     nr_stun_server_ctx *ctx = (nr_stun_server_ctx*)arg;
     nr_stun_server_client *clnt = 0;
     nr_stun_message_attribute *username_attribute;
 
     if ((nr_stun_get_message_client(ctx, msg, &clnt))) {
         if (! nr_stun_message_has_attribute(msg, NR_STUN_ATTR_USERNAME, &username_attribute)) {
-           r_log(NR_LOG_STUN,LOG_NOTICE,"STUN-SERVER(%s): Missing Username",ctx->label);
+           r_log(NR_LOG_STUN,LOG_WARNING,"STUN-SERVER(%s): Missing Username",ctx->label);
            ABORT(R_NOT_FOUND);
         }
 
         /* Although this is an exceptional condition, we'll already have seen a
          * NOTICE-level log message about the unknown user, so additional log
          * messages at any level higher than DEBUG are unnecessary. */
 
         r_log(NR_LOG_STUN,LOG_DEBUG,"STUN-SERVER(%s): Unable to find password for unknown user: %s",ctx->label,username_attribute->u.username);
@@ -270,17 +270,17 @@ int nr_stun_server_process_request(nr_st
         nr_stun_form_error_response(req, res, 400, "Bad Request");
         ABORT(R_ALREADY);
 #endif /* USE_STUN_PEDANTIC */
         ABORT(R_REJECTED);
     }
 
     if (NR_STUN_GET_TYPE_CLASS(req->header.type) != NR_CLASS_REQUEST
      && NR_STUN_GET_TYPE_CLASS(req->header.type) != NR_CLASS_INDICATION) {
-         r_log(NR_LOG_STUN,LOG_NOTICE,"STUN-SERVER(%s): Illegal message type: %04x",ctx->label,req->header.type);
+         r_log(NR_LOG_STUN,LOG_WARNING,"STUN-SERVER(%s): Illegal message type: %04x",ctx->label,req->header.type);
         /* draft-ietf-behave-rfc3489bis-07.txt S 7.3 says "If any errors are
          * detected, the message is silently discarded."  */
 #ifndef USE_STUN_PEDANTIC
         /* ... but that seems like a bad idea, at least return a 400 so
          * that the server isn't a black hole to the client */
         nr_stun_form_error_response(req, res, 400, "Bad Request");
         ABORT(R_ALREADY);
 #endif /* USE_STUN_PEDANTIC */
@@ -342,17 +342,17 @@ int nr_stun_server_process_request(nr_st
         goto skip_response;
 
     /* Now respond */
 
     if (_status != 0 && ! nr_stun_message_has_attribute(res, NR_STUN_ATTR_ERROR_CODE, 0))
          nr_stun_form_error_response(req, res, 500, "Failed to specify error");
 
     if ((r=nr_stun_server_send_response(ctx, sock, peer_addr, res, clnt))) {
-        r_log(NR_LOG_STUN,LOG_WARNING,"STUN-SERVER(label=%s): Failed sending response (my_addr=%s,peer_addr=%s)",ctx->label,ctx->my_addr.as_string,peer_addr->as_string);
+        r_log(NR_LOG_STUN,LOG_ERR,"STUN-SERVER(label=%s): Failed sending response (my_addr=%s,peer_addr=%s)",ctx->label,ctx->my_addr.as_string,peer_addr->as_string);
         _status = R_FAILED;
     }
 
 #if 0
     /* EKR: suppressed these checks because if you have an error when
        you are sending an error, things go wonky */
 #ifdef SANITY_CHECKS
     if (_status == R_ALREADY) {
@@ -426,17 +426,17 @@ static int nr_stun_server_destroy_client
 
 int nr_stun_get_message_client(nr_stun_server_ctx *ctx, nr_stun_message *req, nr_stun_server_client **out)
   {
     int _status;
     nr_stun_message_attribute *attr;
     nr_stun_server_client *clnt=0;
 
     if (! nr_stun_message_has_attribute(req, NR_STUN_ATTR_USERNAME, &attr)) {
-       r_log(NR_LOG_STUN,LOG_NOTICE,"STUN-SERVER(%s): Missing Username",ctx->label);
+       r_log(NR_LOG_STUN,LOG_WARNING,"STUN-SERVER(%s): Missing Username",ctx->label);
        ABORT(R_NOT_FOUND);
     }
 
     STAILQ_FOREACH(clnt, &ctx->clients, entry) {
         if (!strncmp(clnt->username, attr->u.username,
                      sizeof(attr->u.username)))
             break;
     }
@@ -445,22 +445,22 @@ int nr_stun_get_message_client(nr_stun_s
       /* If we can't find a specific client see if this matches the default,
          which means that the username starts with our ufrag.
        */
       char *colon = strchr(attr->u.username, ':');
       if (colon && !strncmp(ctx->default_client->username,
                             attr->u.username,
                             colon - attr->u.username)) {
         clnt = ctx->default_client;
-        r_log(NR_LOG_STUN,LOG_DEBUG,"STUN-SERVER(%s): Falling back to default client, username=: %s",ctx->label,attr->u.username);
+        r_log(NR_LOG_STUN,LOG_NOTICE,"STUN-SERVER(%s): Falling back to default client, username=: %s",ctx->label,attr->u.username);
       }
     }
 
     if (!clnt) {
-        r_log(NR_LOG_STUN,LOG_NOTICE,"STUN-SERVER(%s): Request from unknown user: %s",ctx->label,attr->u.username);
+        r_log(NR_LOG_STUN,LOG_WARNING,"STUN-SERVER(%s): Request from unknown user: %s",ctx->label,attr->u.username);
         ABORT(R_NOT_FOUND);
     }
 
     *out = clnt;
 
     _status=0;
   abort:
     return(_status);
--- a/media/mtransport/third_party/nICEr/src/stun/stun_util.c
+++ b/media/mtransport/third_party/nICEr/src/stun/stun_util.c
@@ -112,17 +112,17 @@ nr_stun_find_local_addresses(nr_local_ad
     if (*count == 0) {
         if ((r=nr_stun_get_addrs(addrs, maxaddrs, 1, count)))
             ABORT(r);
 
         goto done;
     }
 
     if (*count >= maxaddrs) {
-        r_log(NR_LOG_STUN, LOG_WARNING, "Address list truncated from %d to %d", *count, maxaddrs);
+        r_log(NR_LOG_STUN, LOG_INFO, "Address list truncated from %d to %d", *count, maxaddrs);
        *count = maxaddrs;
     }
 
 #if 0
     if (*count > 0) {
       /* TODO(ekr@rtfm.com): Commented out 2012-07-26.
 
          This code is currently not used in Firefox and needs to be
--- a/media/mtransport/third_party/nICEr/src/stun/turn_client_ctx.c
+++ b/media/mtransport/third_party/nICEr/src/stun/turn_client_ctx.c
@@ -242,26 +242,26 @@ static void nr_turn_stun_ctx_cb(NR_SOCKE
     case NR_STUN_CLIENT_STATE_FAILED:
       /* Special case: if this is an authentication error,
          we retry once. This allows the 401/438 nonce retry
          paradigm. After that, we fail */
       /* TODO(ekr@rtfm.com): 401 needs a #define */
       /* TODO(ekr@rtfm.com): Add alternate-server (Mozilla bug 857688) */
       if (ctx->stun->error_code == 401 || ctx->stun->error_code == 438) {
         if (ctx->retry_ct > 0) {
-          r_log(NR_LOG_TURN, LOG_ERR, "TURN(%s): Exceeded the number of retries", ctx->tctx->label);
+          r_log(NR_LOG_TURN, LOG_WARNING, "TURN(%s): Exceeded the number of retries", ctx->tctx->label);
           ABORT(R_FAILED);
         }
 
         if (!ctx->stun->nonce) {
-          r_log(NR_LOG_TURN, LOG_ERR, "TURN(%s): 401 but no nonce", ctx->tctx->label);
+          r_log(NR_LOG_TURN, LOG_WARNING, "TURN(%s): 401 but no nonce", ctx->tctx->label);
           ABORT(R_FAILED);
         }
         if (!ctx->stun->realm) {
-          r_log(NR_LOG_TURN, LOG_ERR, "TURN(%s): 401 but no realm", ctx->tctx->label);
+          r_log(NR_LOG_TURN, LOG_WARNING, "TURN(%s): 401 but no realm", ctx->tctx->label);
           ABORT(R_FAILED);
         }
 
         /* Try to retry */
         if ((r=nr_turn_stun_set_auth_params(ctx, ctx->stun->realm,
                                             ctx->stun->nonce)))
           ABORT(r);
 
@@ -366,17 +366,17 @@ nr_turn_client_ctx_destroy(nr_turn_clien
 
 int nr_turn_client_cancel(nr_turn_client_ctx *ctx)
 {
   if (ctx->state == NR_TURN_CLIENT_STATE_CANCELLED ||
       ctx->state == NR_TURN_CLIENT_STATE_FAILED)
     return 0;
 
   if (ctx->label)
-    r_log(NR_LOG_TURN, LOG_ERR, "TURN(%s): cancelling", ctx->label);
+    r_log(NR_LOG_TURN, LOG_INFO, "TURN(%s): cancelling", ctx->label);
 
   /* Setting these values to 0 isn't strictly necessary, but
      it protects us in case we double cancel and for
      some reason bungle the states above in future.*/
   RFREE(ctx->username);
   ctx->username = 0;
   r_data_destroy(&ctx->password);
   RFREE(ctx->nonce);
@@ -407,17 +407,17 @@ int nr_turn_client_cancel(nr_turn_client
 }
 
 static int nr_turn_client_failed(nr_turn_client_ctx *ctx)
 {
   if (ctx->state == NR_TURN_CLIENT_STATE_FAILED ||
       ctx->state == NR_TURN_CLIENT_STATE_CANCELLED)
     return(0);
 
-  r_log(NR_LOG_TURN, LOG_ERR, "TURN(%s) failed", ctx->label);
+  r_log(NR_LOG_TURN, LOG_WARNING, "TURN(%s) failed", ctx->label);
   nr_turn_client_cancel(ctx);
   ctx->state = NR_TURN_CLIENT_STATE_FAILED;
   if (ctx->finished_cb) {
     ctx->finished_cb(0, 0, ctx->cb_arg);
   }
 
   return(0);
 }
@@ -496,17 +496,17 @@ abort:
   ctx->tctx->finished_cb = 0;  /* So we don't call it again */
   tmp_finished_cb(0, 0, ctx->tctx->cb_arg);
 }
 
 static void nr_turn_client_error_cb(NR_SOCKET s, int how, void *arg)
 {
   nr_turn_stun_ctx *ctx = (nr_turn_stun_ctx *)arg;
 
-  r_log(NR_LOG_TURN, LOG_ERR, "TURN(%s): mode %d, %s",
+  r_log(NR_LOG_TURN, LOG_WARNING, "TURN(%s): mode %d, %s",
         ctx->tctx->label, ctx->mode, __FUNCTION__);
 
   nr_turn_client_failed(ctx->tctx);
 }
 
 int nr_turn_client_allocate(nr_turn_client_ctx *ctx,
                             NR_async_cb finished_cb, void *cb_arg)
 {
@@ -709,17 +709,17 @@ int nr_turn_client_send_indication(nr_tu
     ABORT(r);
 
   if ((r=nr_stun_encode_message(ind)))
     ABORT(r);
 
   if ((r=nr_socket_sendto(ctx->sock,
                           ind->buffer, ind->length, flags,
                           &ctx->turn_server_addr))) {
-    r_log(NR_LOG_TURN, LOG_ERR, "TURN(%s): Failed sending send indication",
+    r_log(NR_LOG_TURN, LOG_WARNING, "TURN(%s): Failed sending send indication",
           ctx->label);
     ABORT(r);
   }
 
   _status=0;
 abort:
   RFREE(ind);
   return(_status);
@@ -734,17 +734,17 @@ int nr_turn_client_parse_data_indication
 {
   int r,_status;
   nr_stun_message *ind=0;
   nr_stun_message_attribute *attr;
   nr_turn_permission *perm;
 
   if (nr_transport_addr_cmp(&ctx->turn_server_addr, source_addr,
                             NR_TRANSPORT_ADDR_CMP_MODE_ALL)) {
-    r_log(NR_LOG_TURN, LOG_DEBUG,
+    r_log(NR_LOG_TURN, LOG_WARNING,
           "TURN(%s): Indication from unexpected source addr %s (expected %s)",
           ctx->label, source_addr->as_string, ctx->turn_server_addr.as_string);
     ABORT(R_REJECTED);
   }
 
   if ((r=nr_stun_message_create2(&ind, msg, len)))
     ABORT(r);
   if ((r=nr_stun_decode_message(ind, 0, 0)))
@@ -754,17 +754,17 @@ int nr_turn_client_parse_data_indication
     ABORT(R_BAD_ARGS);
 
   if (!nr_stun_message_has_attribute(ind, NR_STUN_ATTR_XOR_PEER_ADDRESS, &attr))
     ABORT(R_BAD_ARGS);
 
   if ((r=nr_turn_permission_find(ctx, &attr->u.xor_mapped_address.unmasked,
                                  &perm))) {
     if (r == R_NOT_FOUND) {
-      r_log(NR_LOG_TURN, LOG_INFO,
+      r_log(NR_LOG_TURN, LOG_WARNING,
             "TURN(%s): Indication from peer addr %s with no permission",
             ctx->label, attr->u.xor_mapped_address.unmasked.as_string);
     }
     ABORT(r);
   }
 
   if ((r=nr_transport_addr_copy(remote_addr,
                                 &attr->u.xor_mapped_address.unmasked)))