Changeset 4da7bc195ba74cd373f56a55be00fb4deb4cbaea

Show
Ignore:
Timestamp:
11/25/09 05:05:15 (4 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1259125515 +0000
git-parent:

[d857961480f92ca18f2038fff87f7ae88713872c]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1259125515 +0000
Message:

all logging cleanup

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/stratcon_jlog_streamer.c

    rae8bf79 r4da7bc1  
    5959static void noit_connection_initiate_connection(noit_connection_ctx_t *ctx); 
    6060 
     61static const char *feed_type_to_str(int jlog_feed_cmd) { 
     62  switch(jlog_feed_cmd) { 
     63    case NOIT_JLOG_DATA_FEED: return "durable/storage"; 
     64    case NOIT_JLOG_DATA_TEMP_FEED: return "transient/iep"; 
     65  } 
     66  return "unknown"; 
     67} 
     68 
    6169static int 
    6270remote_str_sort(const void *a, const void *b) { 
     
    118126    } 
    119127  } 
    120   switch(ntohl(jctx->jlog_feed_cmd)) { 
    121     case NOIT_JLOG_DATA_FEED: feedtype = "durable/storage"; break; 
    122     case NOIT_JLOG_DATA_TEMP_FEED: feedtype = "transient/iep"; break; 
    123   } 
     128  feedtype = feed_type_to_str(ntohl(jctx->jlog_feed_cmd)); 
    124129  nc_printf(ncct, "\tJLog event streamer [%s]\n", feedtype); 
    125130  gettimeofday(&now, NULL); 
     
    430435          ctx->push(DS_OP_CHKPT, &nctx->r.remote, nctx->remote_cn, 
    431436                    NULL, completion_e); 
    432           noitL(noit_debug, "Pushing batch asynch...\n"); 
     437          noitL(noit_debug, "Pushing %s batch async [%s]: [%u/%u]\n", 
     438                feed_type_to_str(ntohl(ctx->jlog_feed_cmd)), 
     439                nctx->remote_cn ? nctx->remote_cn : "(null)", 
     440                ctx->header.chkpt.log, ctx->header.chkpt.marker); 
    433441          return 0; 
    434442        } else 
     
    439447        ctx->state = JLOG_STREAMER_WANT_CHKPT; /* falls through */ 
    440448      case JLOG_STREAMER_WANT_CHKPT: 
    441         noitL(noit_debug, "Pushing checkpoint [%s]: [%u/%u]\n", 
     449        noitL(noit_debug, "Pushing %s checkpoint [%s]: [%u/%u]\n", 
     450              feed_type_to_str(ntohl(ctx->jlog_feed_cmd)), 
    442451              nctx->remote_cn ? nctx->remote_cn : "(null)", 
    443452              ctx->header.chkpt.log, ctx->header.chkpt.marker); 
     
    825834  xmlDocSetRootElement(doc, root); 
    826835  for(i=0; i<n; i++) { 
    827     char buff[256], *feedtype = "unknown", *state = "unknown"; 
     836    char buff[256]; 
     837    const char *feedtype = "unknown", *state = "unknown"; 
    828838    xmlNodePtr node; 
    829839    noit_connection_ctx_t *ctx = ctxs[i]; 
     
    865875    } 
    866876    xmlSetProp(node, (xmlChar *)"remote", (xmlChar *)ctx->remote_str); 
    867     switch(ntohl(jctx->jlog_feed_cmd)) { 
    868       case NOIT_JLOG_DATA_FEED: feedtype = "durable/storage"; break; 
    869       case NOIT_JLOG_DATA_TEMP_FEED: feedtype = "transient/iep"; break; 
    870     } 
     877    feedtype = feed_type_to_str(ntohl(jctx->jlog_feed_cmd)); 
    871878    xmlSetProp(node, (xmlChar *)"type", (xmlChar *)feedtype); 
    872879    if(ctx->timeout_event) {