mod_netconf: standalone application for testing

+ debug message, refactoring
diff --git a/src/mod_netconf.h b/src/mod_netconf.h
index 1abf803..bd497a7 100644
--- a/src/mod_netconf.h
+++ b/src/mod_netconf.h
@@ -85,6 +85,22 @@
 extern pthread_rwlock_t session_lock; /**< mutex protecting netconf_session_list from multiple access errors */
 
 json_object *create_error(const char *errmess);
+json_object *create_ok();
+
+extern server_rec *http_server;
+#ifndef HTTPD_INDEPENDENT
+# define APLOGERROR(...) ap_log_error(APLOG_MARK, APLOG_ERR, 0, http_server, __VA_ARGS__);
+#else
+# define APLOGERROR(...)
+#endif
+#define DEBUG(...) do { \
+	if (http_server != NULL) { \
+		APLOGERROR(__VA_ARGS__); \
+	} else { \
+		fprintf(stderr, __VA_ARGS__); \
+		fprintf(stderr, "\n"); \
+	} \
+} while (0);
 
 #endif