From: Martin Mares Date: Sun, 14 Jan 2001 17:51:37 +0000 (+0000) Subject: Switch to new logging functions. X-Git-Tag: holmes-import~1599 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=521907ed0ed9a9b387b3870bc7128250fcbdab1b;p=libucw.git Switch to new logging functions. --- diff --git a/lib/conf-test.c b/lib/conf-test.c index 6e9891c3..a2242be2 100644 --- a/lib/conf-test.c +++ b/lib/conf-test.c @@ -73,7 +73,7 @@ int main(int argc, char *argv[]) { int c; - initlog(argv[0]); + log_init(argv[0]); cf_register(jmeno); cf_register(telo); diff --git a/lib/conf.c b/lib/conf.c index 9d3b284b..924b3989 100644 --- a/lib/conf.c +++ b/lib/conf.c @@ -76,13 +76,13 @@ static int cf_subread(byte *filename,int level) byte *msg=NULL; if(level>=MAX_LEVEL){ - log(L_ERROR "Too many (%d) nested files when reading %s",level,filename); + log(L_ERROR,"Too many (%d) nested files when reading %s",level,filename); return 0; } fd=sh_open(filename,O_RDONLY, 0666); if(fd<0){ - log(L_ERROR "Cannot open file %s",filename); + log(L_ERROR,"Cannot open configuration file %s: %m",filename); return 0; } b=bfdopen(fd,4096); @@ -149,7 +149,7 @@ static int cf_subread(byte *filename,int level) } /* for every line */ if(msg) - log(L_ERROR "%s, line %d: %s",filename,line,msg); + log(L_ERROR,"%s, line %d: %s",filename,line,msg); bclose(b); return !msg; } diff --git a/lib/db-test.c b/lib/db-test.c index dabbbaa7..659313b8 100644 --- a/lib/db-test.c +++ b/lib/db-test.c @@ -260,7 +260,7 @@ int main(int argc, char **argv) char *ch; int dont_delete = 0; - initlog("dbtest"); + log_init("dbtest"); setvbuf(stdout, NULL, _IONBF, 0); setvbuf(stderr, NULL, _IONBF, 0); while ((c = getopt(argc, argv, "c:p:k:n:d:vsStF")) >= 0)