]> git.sommitrealweird.co.uk Git - onak.git/blobdiff - lookup.c
cscvs to tla changeset 67
[onak.git] / lookup.c
index 95ab6af01f2f54454474e87c4143bcdfb29f4e6f..d6017d23267d5bb34038f9de901e2bc2977c7aaa 100644 (file)
--- a/lookup.c
+++ b/lookup.c
@@ -17,6 +17,7 @@
 #include "getcgi.h"
 #include "keydb.h"
 #include "keyindex.h"
 #include "getcgi.h"
 #include "keydb.h"
 #include "keyindex.h"
+#include "log.h"
 #include "mem.h"
 #include "onak-conf.h"
 #include "parsekey.h"
 #include "mem.h"
 #include "onak-conf.h"
 #include "parsekey.h"
@@ -120,6 +121,7 @@ int main(int argc, char *argv[])
                puts("Error: No key to search for supplied.");
        } else {
                readconfig();
                puts("Error: No key to search for supplied.");
        } else {
                readconfig();
+               initlogthing("lookup", config.logfile);
                initdb();
                switch (op) {
                case OP_GET:
                initdb();
                switch (op) {
                case OP_GET:
@@ -148,6 +150,8 @@ int main(int argc, char *argv[])
                        puts("Unknown operation!");
                }
                cleanupdb();
                        puts("Unknown operation!");
                }
                cleanupdb();
+               cleanuplogthing();
+               cleanupconfig();
        }
        puts("<hr>");
        puts("Produced by onak " VERSION " by Jonathan McDowell");
        }
        puts("<hr>");
        puts("Produced by onak " VERSION " by Jonathan McDowell");