Show
Ignore:
Timestamp:
01/30/08 05:06:13 (6 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1201669573 +0000
git-parent:

[27bd35b5a3e6285c5119854280b9d30b9b869fdf]

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

update logging to support faster avoidance, line numbers, filenames, etc.

Files:

Legend:

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

    rb09f3a7 r1afde4e  
    3939  dlhandle = dlopen(module_file, RTLD_LAZY | RTLD_GLOBAL); 
    4040  if(!dlhandle) { 
    41     noit_log(noit_stderr, NULL, "Cannot open image '%s': %s\n", 
    42              module_file, dlerror()); 
     41    noitL(noit_stderr, "Cannot open image '%s': %s\n", 
     42          module_file, dlerror()); 
    4343    return -1; 
    4444  } 
     
    4646  dlsymbol = dlsym(dlhandle, name); 
    4747  if(!dlsymbol) { 
    48     noit_log(noit_stderr, NULL, "Cannot find '%s' in image '%s': %s\n", 
    49              name, module_file, dlerror()); 
     48    noitL(noit_stderr, "Cannot find '%s' in image '%s': %s\n", 
     49          name, module_file, dlerror()); 
    5050    dlclose(dlhandle); 
    5151    return -1; 
     
    5353 
    5454  if(noit_module_validate_magic((noit_module_t *)dlsymbol) == -1) { 
    55     noit_log(noit_stderr, NULL, "I can't understand module %s\n", name); 
     55    noitL(noit_stderr, "I can't understand module %s\n", name); 
    5656    dlclose(dlhandle); 
    5757    return -1; 
     
    9292    if(!noit_conf_get_stringbuf(sections[i], "image", 
    9393                                module_file, sizeof(module_file))) { 
    94       noit_log(noit_stderr, NULL, 
    95                "No image defined in module stanza %d\n", i+1); 
     94      noitL(noit_stderr, "No image defined in module stanza %d\n", i+1); 
    9695      continue; 
    9796    } 
    9897    if(!noit_conf_get_stringbuf(sections[i], "name", 
    9998                                module_name, sizeof(module_name))) { 
    100       noit_log(noit_stderr, NULL, 
    101                "No name defined in module stanza %d\n", i+1); 
     99      noitL(noit_stderr, "No name defined in module stanza %d\n", i+1); 
    102100      continue; 
    103101    } 
    104102    if(noit_module_load(module_file, module_name)) { 
    105       noit_log(noit_stderr, NULL, 
    106                "Could not load %s:%s\n", module_file, module_name); 
     103      noitL(noit_stderr, "Could not load %s:%s\n", module_file, module_name); 
    107104      continue; 
    108105    } 
     
    110107    module = noit_module_lookup(module_name); 
    111108    if(module->config(module, config)) { 
    112       noit_log(noit_stderr, NULL
    113                "Configure failed on %s:%s\n", module_file, module_name); 
     109      noitL(noit_stderr
     110            "Configure failed on %s:%s\n", module_file, module_name); 
    114111      continue; 
    115112    } 
    116113    if(module->init(module)) { 
    117       noit_log(noit_stderr, NULL
    118                "Initialized failed on %s:%s\n", module_file, module_name); 
     114      noitL(noit_stderr
     115            "Initialized failed on %s:%s\n", module_file, module_name); 
    119116      continue; 
    120117    } 
    121     noit_log(noit_stderr, NULL, "Module %s:%s successfully loaded.\n", 
    122              module_file, module_name); 
     118    noitL(noit_stderr, "Module %s:%s successfully loaded.\n", 
     119          module_file, module_name); 
    123120  } 
    124121}