Changeset: 216d1387454d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=216d1387454d
Modified Files:
        clients/mapiclient/Makefile.ag
        clients/mapiclient/msqldump.c
Branch: mlogger
Log Message:

Added Tracer -> msqldump.c


diffs (57 lines):

diff --git a/clients/mapiclient/Makefile.ag b/clients/mapiclient/Makefile.ag
--- a/clients/mapiclient/Makefile.ag
+++ b/clients/mapiclient/Makefile.ag
@@ -27,6 +27,7 @@ bin_msqldump = {
        LIBS = libmcutil ../../common/utils/libmutils \
                ../mapilib/libmapi \
                ../../common/stream/libstream \
+               ../../gdk/libgdktracer \
                $(SOCKET_LIBS) $(zlib_LIBS) $(bzip2_LIBS) $(snappy_LIBS) 
$(lz4_LIBS) $(liblzma_LIBS) $(curl_LIBS) $(LTLIBICONV) $(openssl_LIBS)
 }
 
diff --git a/clients/mapiclient/msqldump.c b/clients/mapiclient/msqldump.c
--- a/clients/mapiclient/msqldump.c
+++ b/clients/mapiclient/msqldump.c
@@ -26,6 +26,7 @@
 #include "mprompt.h"
 #include "mutils.h"            /* mercurial_revision */
 #include "dotmonetdb.h"
+#include "gdk_tracer.h"
 
 static _Noreturn void usage(const char *prog, int xit);
 
@@ -172,7 +173,7 @@ main(int argc, char **argv)
        if (dbname)
                free(dbname);
        if (mid == NULL) {
-               fprintf(stderr, "failed to allocate Mapi structure\n");
+               Trace(M_CRITICAL, "failed to allocate Mapi structure\n");
                exit(2);
        }
        if (mapi_error(mid)) {
@@ -183,14 +184,14 @@ main(int argc, char **argv)
                const char *motd = mapi_get_motd(mid);
 
                if (motd)
-                       fprintf(stderr, "%s", motd);
+                       Trace(M_INFO, "%s", motd);
        }
        mapi_trace(mid, trace);
        mapi_cache_limit(mid, 10000);
 
        out = file_wastream(stdout, "stdout");
        if (out == NULL) {
-               fprintf(stderr, "failed to allocate stream\n");
+               Trace(M_CRITICAL, "failed to allocate stream\n");
                exit(2);
        }
        if (!quiet) {
@@ -236,7 +237,7 @@ main(int argc, char **argv)
 
        mapi_destroy(mid);
        if (mnstr_errnr(out)) {
-               fprintf(stderr, "%s: %s", argv[0], mnstr_error(out));
+               Trace(M_ERROR, "%s: %s", argv[0], mnstr_error(out));
                return 1;
        }
 
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to