Changeset 6c8c5259c6ac9ddc2ccfe9c2409a72a743af6099

Show
Ignore:
Timestamp:
08/12/11 03:28:29 (3 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1313119709 -0400
git-parent:

[b394de2213c1f29eca92242b6fa60df439236740]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1313119709 -0400
Message:

leverage the jlog error func as it is more descriptive.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/utils/noit_log.c

    rc3852a0 r6c8c525  
    436436  return 0; 
    437437} 
     438static void 
     439noit_log_jlog_err(void *ctx, const char *format, ...) { 
     440  int rv; 
     441  struct timeval now; 
     442  va_list arg; 
     443  va_start(arg, format); 
     444  gettimeofday(&now, NULL); 
     445  rv = noit_vlog(noit_error, &now, "jlog.c", 0, format, arg); 
     446  va_end(arg); 
     447} 
    438448static int 
    439449jlog_logio_open(noit_log_stream_t ls) { 
     
    447457  log = jlog_new(path); 
    448458  if(!log) return -1; 
     459  jlog_set_error_func(log, noit_log_jlog_err, ls); 
    449460  /* Open the writer. */ 
    450461  if(jlog_ctx_open_writer(log)) { 
     
    454465    jlog_ctx_close(log); 
    455466    log = jlog_new(path); 
     467    jlog_set_error_func(log, noit_log_jlog_err, ls); 
    456468    if(jlog_ctx_init(log)) { 
    457469      noitL(noit_error, "Cannot init jlog writer: %s\n", 
     
    463475    jlog_ctx_close(log); 
    464476    log = jlog_new(path); 
     477    jlog_set_error_func(log, noit_log_jlog_err, ls); 
    465478    if(jlog_ctx_open_writer(log)) { 
    466479      noitL(noit_error, "Cannot open jlog writer: %s\n",