]> git.sommitrealweird.co.uk Git - onak.git/commitdiff
Fix maxpath to initialise the logging infrastructure.
authorJonathan McDowell <noodles@earth.li>
Sat, 25 Sep 2004 09:05:04 +0000 (09:05 +0000)
committerJonathan McDowell <noodles@earth.li>
Sat, 25 Sep 2004 09:05:04 +0000 (09:05 +0000)
maxpath wasn't initialising the logging infrastructure, so would
log to stderr rather than the log file for example. Fix this.

maxpath.c

index dfee16c4025cba994b0a19cc55d2f2a68cf28dd0..191ce8aa3764c82ab07033e3bf7a34b88c0bd5ad 100644 (file)
--- a/maxpath.c
+++ b/maxpath.c
@@ -14,6 +14,7 @@
 #include "hash.h"
 #include "keydb.h"
 #include "ll.h"
+#include "log.h"
 #include "onak-conf.h"
 #include "stats.h"
 
@@ -70,6 +71,7 @@ void findmaxpath(unsigned long max)
 int main(int argc, char *argv[])
 {
        readconfig(NULL);
+       initlogthing("maxpath", config.logfile);
        initdb(true);
        inithash();
        findmaxpath(30);
@@ -77,6 +79,7 @@ int main(int argc, char *argv[])
        findmaxpath(30);
        destroyhash();
        cleanupdb();
+       cleanuplogthing();
        cleanupconfig();
        
        return EXIT_SUCCESS;