Changeset 4bed82ba2ec9a01ba1c538c5f0f2d7c17e0bd687

Show
Ignore:
Timestamp:
08/01/08 14:28:28 (6 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1217600908 +0000
git-parent:

[2f4743883d7decd0dabcb5da1a3a772bc4ffab23]

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

update the noit_log new API to allow passing of a context

Files:

Legend:

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

    rdcd539d r4bed82b  
    693693                                "ancestor-or-self::node()/config/*"); 
    694694    ls = noit_log_stream_new(name, type[0] ? type : NULL, 
    695                              path[0] ? path : NULL, config); 
     695                             path[0] ? path : NULL, NULL, config); 
    696696    if(!ls) { 
    697697      fprintf(stderr, "Error configuring log: %s[%s:%s]\n", name, type, path); 
  • src/utils/noit_log.c

    rcdd3b47 r4bed82b  
    149149  noit_register_logops("jlog", &jlog_logio_ops); 
    150150  noit_stderr = noit_log_stream_new_on_fd("stderr", 2, NULL); 
    151   noit_error = noit_log_stream_new("error", NULL, NULL, NULL); 
    152   noit_debug = noit_log_stream_new("debug", NULL, NULL, NULL); 
     151  noit_error = noit_log_stream_new("error", NULL, NULL, NULL, NULL); 
     152  noit_debug = noit_log_stream_new("debug", NULL, NULL, NULL, NULL); 
    153153} 
    154154 
     
    181181noit_log_stream_t 
    182182noit_log_stream_new_on_file(const char *path, noit_hash_table *config) { 
    183   return noit_log_stream_new(path, "file", path, config); 
     183  return noit_log_stream_new(path, "file", path, NULL, config); 
    184184} 
    185185 
    186186noit_log_stream_t 
    187187noit_log_stream_new(const char *name, const char *type, const char *path, 
    188                     noit_hash_table *config) { 
     188                    void *ctx, noit_hash_table *config) { 
    189189  noit_log_stream_t ls, saved; 
    190190  struct _noit_log_stream tmpbuf; 
     
    221221      goto freebail; 
    222222 
     223  /* This is for things that don't open on paths */ 
     224  if(ctx) ls->op_ctx = ctx; 
    223225  return ls; 
    224226 
  • src/utils/noit_log.h

    r8d0941e r4bed82b  
    4343API_EXPORT(noit_log_stream_t) 
    4444  noit_log_stream_new(const char *, const char *, const char *, 
    45                       noit_hash_table *); 
     45                      void *, noit_hash_table *); 
    4646API_EXPORT(noit_log_stream_t) 
    4747  noit_log_stream_new_on_fd(const char *, int, noit_hash_table *);