From 8a6946b18003fae6400a137389f0cb13d0ac4bd6 Mon Sep 17 00:00:00 2001 From: m0gg Date: Sat, 3 Nov 2007 22:40:09 +0000 Subject: Split nanoHTTP and cSOAP logging --- examples/nanohttp/Makefile.in | 2 +- examples/nanohttp/http_client.c | 5 +++-- examples/nanohttp/http_server.c | 7 ++++--- examples/nanohttp/mime_client.c | 6 +++--- 4 files changed, 11 insertions(+), 9 deletions(-) (limited to 'examples/nanohttp') diff --git a/examples/nanohttp/Makefile.in b/examples/nanohttp/Makefile.in index f918782..9f2aabe 100644 --- a/examples/nanohttp/Makefile.in +++ b/examples/nanohttp/Makefile.in @@ -200,7 +200,7 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ # -# $Revision: 1.1 $ +# $Revision: 1.2 $ # LDADD = ../../nanohttp/libnanohttp.la INCLUDES = -I${top_srcdir} diff --git a/examples/nanohttp/http_client.c b/examples/nanohttp/http_client.c index 1b9c912..adcd199 100644 --- a/examples/nanohttp/http_client.c +++ b/examples/nanohttp/http_client.c @@ -1,5 +1,5 @@ /****************************************************************** -* $Id: http_client.c,v 1.9 2006/12/10 19:21:06 m0gg Exp $ +* $Id: http_client.c,v 1.10 2007/11/03 22:40:09 m0gg Exp $ * * CSOAP Project: A http client/server library in C (example) * Copyright (C) 2003-2004 Ferhat Ayaz @@ -25,6 +25,7 @@ #include #include +#include #include #define MAX_BUFFER_SIZE 1024 @@ -105,7 +106,7 @@ int main(int argc, char **argv) } /* Set log level to see more information written by the library */ - hlog_set_level(HLOG_INFO); + nanohttp_log_set_loglevel(NANOHTTP_LOG_INFO); /* Initialize httpc module */ if (httpc_init(argc, argv)) diff --git a/examples/nanohttp/http_server.c b/examples/nanohttp/http_server.c index eb98d33..5daad9a 100644 --- a/examples/nanohttp/http_server.c +++ b/examples/nanohttp/http_server.c @@ -1,5 +1,5 @@ /****************************************************************** -* $Id: http_server.c,v 1.14 2007/01/05 09:02:50 m0gg Exp $ +* $Id: http_server.c,v 1.15 2007/11/03 22:40:09 m0gg Exp $ * * CSOAP Project: A http client/server library in C (example) * Copyright (C) 2003 Ferhat Ayaz @@ -25,6 +25,7 @@ #include #include +#include #include static int @@ -142,12 +143,12 @@ int main(int argc, char **argv) { herror_t status; - hlog_set_level(HLOG_INFO); + + nanohttp_log_set_loglevel(NANOHTTP_LOG_INFO); if (httpd_init(argc, argv)) { fprintf(stderr, "Cannot init httpd\n"); - httpd_destroy(); exit(1); } diff --git a/examples/nanohttp/mime_client.c b/examples/nanohttp/mime_client.c index e4d50ba..ffa8de7 100755 --- a/examples/nanohttp/mime_client.c +++ b/examples/nanohttp/mime_client.c @@ -1,5 +1,5 @@ /****************************************************************** -* $Id: mime_client.c,v 1.1 2007/01/03 21:31:44 m0gg Exp $ +* $Id: mime_client.c,v 1.2 2007/11/03 22:40:09 m0gg Exp $ * * CSOAP Project: A http client/server library in C (example) * Copyright (C) 2003 Ferhat Ayaz @@ -122,7 +122,7 @@ int main(int argc, char **argv) } /* Set log level to see more information written by the library */ - // log_set_level(HLOG_VERBOSE); + // log_set_level(NANOHTTP_LOG_VERBOSE); /* Initialize httpc module */ if ((status = httpc_init(argc, argv)) != H_OK) @@ -142,7 +142,7 @@ int main(int argc, char **argv) */ if ((status = httpc_mime_begin(conn, argv[1], argv[3], "", argv[4])) != H_OK) { - log_error2("Can not start MIME: %s\n", herror_message(status)); + fprintf(stderr, "Can not start MIME: %s\n", herror_message(status)); herror_release(status); exit(1); } -- cgit v1.1-32-gdbae