qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tr...@apache.org
Subject svn commit: r1560144 - in /qpid/dispatch/trunk: include/qpid/dispatch/ src/ tests/
Date Tue, 21 Jan 2014 18:53:38 GMT
Author: tross
Date: Tue Jan 21 18:53:38 2014
New Revision: 1560144

URL: http://svn.apache.org/r1560144
Log:
QPID-5491 - Added QD_ to log severity constants in C.
Based on a patch from Rajith Attapattu

Modified:
    qpid/dispatch/trunk/include/qpid/dispatch/log.h
    qpid/dispatch/trunk/src/agent.c
    qpid/dispatch/trunk/src/alloc.c
    qpid/dispatch/trunk/src/config.c
    qpid/dispatch/trunk/src/container.c
    qpid/dispatch/trunk/src/log.c
    qpid/dispatch/trunk/src/python_embedded.c
    qpid/dispatch/trunk/src/router_config.c
    qpid/dispatch/trunk/src/router_node.c
    qpid/dispatch/trunk/src/router_pynode.c
    qpid/dispatch/trunk/src/server.c
    qpid/dispatch/trunk/tests/compose_test.c
    qpid/dispatch/trunk/tests/parse_test.c
    qpid/dispatch/trunk/tests/server_test.c

Modified: qpid/dispatch/trunk/include/qpid/dispatch/log.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/include/qpid/dispatch/log.h?rev=1560144&r1=1560143&r2=1560144&view=diff
==============================================================================
--- qpid/dispatch/trunk/include/qpid/dispatch/log.h (original)
+++ qpid/dispatch/trunk/include/qpid/dispatch/log.h Tue Jan 21 18:53:38 2014
@@ -19,14 +19,14 @@
  * under the License.
  */
 
-#define LOG_NONE     0x00000000
-#define LOG_TRACE    0x00000001
-#define LOG_DEBUG    0x00000002
-#define LOG_INFO     0x00000004
-#define LOG_NOTICE   0x00000008
-#define LOG_WARNING  0x00000010
-#define LOG_ERROR    0x00000020
-#define LOG_CRITICAL 0x00000040
+#define QD_LOG_NONE     0x00000000
+#define QD_LOG_TRACE    0x00000001
+#define QD_LOG_DEBUG    0x00000002
+#define QD_LOG_INFO     0x00000004
+#define QD_LOG_NOTICE   0x00000008
+#define QD_LOG_WARNING  0x00000010
+#define QD_LOG_ERROR    0x00000020
+#define QD_LOG_CRITICAL 0x00000040
 
 void qd_log_impl(const char *module, int cls, const char *file, int line, const char *fmt,
...);
 #define qd_log(m, c, f, ...) qd_log_impl(m, c, __FILE__, __LINE__, f , ##__VA_ARGS__)

Modified: qpid/dispatch/trunk/src/agent.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/agent.c?rev=1560144&r1=1560143&r2=1560144&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/agent.c (original)
+++ qpid/dispatch/trunk/src/agent.c Tue Jan 21 18:53:38 2014
@@ -131,7 +131,7 @@ static void qd_agent_process_get(qd_agen
     if (cls_record == 0)
         return;
 
-    qd_log(log_module, LOG_TRACE, "Received GET request for type: %s", qd_hash_key_by_handle(cls_record->hash_handle));
+    qd_log(log_module, QD_LOG_TRACE, "Received GET request for type: %s", qd_hash_key_by_handle(cls_record->hash_handle));
 
     qd_composed_field_t *field = qd_agent_setup_response(reply_to, cid);
 
@@ -174,7 +174,7 @@ static void qd_agent_process_discover_ty
                                             qd_field_iterator_t *reply_to,
                                             qd_field_iterator_t *cid)
 {
-    qd_log(log_module, LOG_TRACE, "Received DISCOVER-TYPES request");
+    qd_log(log_module, QD_LOG_TRACE, "Received DISCOVER-TYPES request");
 
     qd_composed_field_t *field = qd_agent_setup_response(reply_to, cid);
 
@@ -214,7 +214,7 @@ static void qd_agent_process_discover_op
                                                  qd_field_iterator_t *reply_to,
                                                  qd_field_iterator_t *cid)
 {
-    qd_log(log_module, LOG_TRACE, "Received DISCOVER-OPERATIONS request");
+    qd_log(log_module, QD_LOG_TRACE, "Received DISCOVER-OPERATIONS request");
 
     qd_composed_field_t *field = qd_agent_setup_response(reply_to, cid);
 
@@ -256,7 +256,7 @@ static void qd_agent_process_discover_no
                                             qd_field_iterator_t *reply_to,
                                             qd_field_iterator_t *cid)
 {
-    qd_log(log_module, LOG_TRACE, "Received DISCOVER-MGMT-NODES request");
+    qd_log(log_module, QD_LOG_TRACE, "Received DISCOVER-MGMT-NODES request");
 
     qd_composed_field_t *field = qd_agent_setup_response(reply_to, cid);
 
@@ -321,7 +321,7 @@ static void qd_agent_process_request(qd_
     // Exit if there was a parsing error.
     //
     if (!qd_parse_ok(map)) {
-        qd_log(log_module, LOG_TRACE, "Received unparsable App Properties: %s", qd_parse_error(map));
+        qd_log(log_module, QD_LOG_TRACE, "Received unparsable App Properties: %s", qd_parse_error(map));
         qd_field_iterator_free(ap);
         qd_field_iterator_free(reply_to);
         qd_parse_free(map);
@@ -429,7 +429,7 @@ static qd_agent_class_t *qd_agent_regist
 
     DEQ_INSERT_TAIL(agent->class_list, cls);
 
-    qd_log(log_module, LOG_INFO, "Manageable Entity Type (%s) %s", query_handler ? "object"
: "event", fqname);
+    qd_log(log_module, QD_LOG_INFO, "Manageable Entity Type (%s) %s", query_handler ? "object"
: "event", fqname);
     return cls;
 }
 

Modified: qpid/dispatch/trunk/src/alloc.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/alloc.c?rev=1560144&r1=1560143&r2=1560144&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/alloc.c (original)
+++ qpid/dispatch/trunk/src/alloc.c Tue Jan 21 18:53:38 2014
@@ -65,7 +65,7 @@ static void qd_alloc_init(qd_alloc_type_
 {
     sys_mutex_lock(init_lock);
 
-    //qd_log("ALLOC", LOG_TRACE, "Initialized Allocator - type=%s type-size=%d total-size=%d",
+    //qd_log("ALLOC", QD_LOG_TRACE, "Initialized Allocator - type=%s type-size=%d total-size=%d",
     //       desc->type_name, desc->type_size, desc->total_size);
 
     if (!desc->global_pool) {

Modified: qpid/dispatch/trunk/src/config.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/config.c?rev=1560144&r1=1560143&r2=1560144&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/config.c (original)
+++ qpid/dispatch/trunk/src/config.c Tue Jan 21 18:53:38 2014
@@ -61,7 +61,7 @@ qd_config_t *qd_config(const char *filen
     if (!config->pModule) {
         PyErr_Print();
         free_qd_config_t(config);
-        qd_log(log_module, LOG_ERROR, "Unable to load configuration module: %s", PYTHON_MODULE);
+        qd_log(log_module, QD_LOG_ERROR, "Unable to load configuration module: %s", PYTHON_MODULE);
         return 0;
     }
 
@@ -70,7 +70,7 @@ qd_config_t *qd_config(const char *filen
         PyErr_Print();
         Py_DECREF(config->pModule);
         free_qd_config_t(config);
-        qd_log(log_module, LOG_ERROR, "Problem with configuration module: Missing DispatchConfig
class");
+        qd_log(log_module, QD_LOG_ERROR, "Problem with configuration module: Missing DispatchConfig
class");
         return 0;
     }
 
@@ -105,7 +105,7 @@ void qd_config_read(qd_config_t *config)
 
     pMethod = PyObject_GetAttrString(config->pObject, "read_file");
     if (!pMethod || !PyCallable_Check(pMethod)) {
-        qd_log(log_module, LOG_ERROR, "Problem with configuration module: No callable 'read_file'");
+        qd_log(log_module, QD_LOG_ERROR, "Problem with configuration module: No callable
'read_file'");
         if (pMethod) {
             Py_DECREF(pMethod);
         }
@@ -121,7 +121,7 @@ void qd_config_read(qd_config_t *config)
 #ifndef NDEBUG
         PyErr_Print();
 #endif
-        qd_log(log_module, LOG_CRITICAL, "Configuration Failed, Exiting");
+        qd_log(log_module, QD_LOG_CRITICAL, "Configuration Failed, Exiting");
         exit(1);
     }
     Py_DECREF(pMethod);
@@ -151,7 +151,7 @@ int qd_config_item_count(const qd_config
 
     pMethod = PyObject_GetAttrString(config->pObject, "item_count");
     if (!pMethod || !PyCallable_Check(pMethod)) {
-        qd_log(log_module, LOG_ERROR, "Problem with configuration module: No callable 'item_count'");
+        qd_log(log_module, QD_LOG_ERROR, "Problem with configuration module: No callable
'item_count'");
         if (pMethod) {
             Py_DECREF(pMethod);
         }
@@ -188,7 +188,7 @@ static PyObject *item_value(const qd_con
 
     pMethod = PyObject_GetAttrString(config->pObject, method);
     if (!pMethod || !PyCallable_Check(pMethod)) {
-        qd_log(log_module, LOG_ERROR, "Problem with configuration module: No callable '%s'",
method);
+        qd_log(log_module, QD_LOG_ERROR, "Problem with configuration module: No callable
'%s'", method);
         if (pMethod) {
             Py_DECREF(pMethod);
         }

Modified: qpid/dispatch/trunk/src/container.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/container.c?rev=1560144&r1=1560143&r2=1560144&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/container.c (original)
+++ qpid/dispatch/trunk/src/container.c Tue Jan 21 18:53:38 2014
@@ -477,7 +477,7 @@ qd_container_t *qd_container(qd_dispatch
     container->default_node  = 0;
     DEQ_INIT(container->node_type_list);
 
-    qd_log(module, LOG_TRACE, "Container Initializing");
+    qd_log(module, QD_LOG_TRACE, "Container Initializing");
     qd_server_set_conn_handler(qd, handler, container);
 
     return container;
@@ -522,7 +522,7 @@ int qd_container_register_node_type(qd_d
     qd_field_iterator_free(iter);
     if (result < 0)
         return result;
-    qd_log(module, LOG_TRACE, "Node Type Registered - %s", nt->type_name);
+    qd_log(module, QD_LOG_TRACE, "Node Type Registered - %s", nt->type_name);
 
     return 0;
 }
@@ -540,10 +540,10 @@ qd_node_t *qd_container_set_default_node
 
     if (nt) {
         container->default_node = qd_container_create_node(qd, nt, 0, context, supported_dist,
QD_LIFE_PERMANENT);
-        qd_log(module, LOG_TRACE, "Node of type '%s' installed as default node", nt->type_name);
+        qd_log(module, QD_LOG_TRACE, "Node of type '%s' installed as default node", nt->type_name);
     } else {
         container->default_node = 0;
-        qd_log(module, LOG_TRACE, "Default node removed");
+        qd_log(module, QD_LOG_TRACE, "Default node removed");
     }
 
     return container->default_node;
@@ -586,7 +586,7 @@ qd_node_t *qd_container_create_node(qd_d
     }
 
     if (name)
-        qd_log(module, LOG_TRACE, "Node of type '%s' created with name '%s'", nt->type_name,
name);
+        qd_log(module, QD_LOG_TRACE, "Node of type '%s' created with name '%s'", nt->type_name,
name);
 
     return node;
 }

Modified: qpid/dispatch/trunk/src/log.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/log.c?rev=1560144&r1=1560143&r2=1560144&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/log.c (original)
+++ qpid/dispatch/trunk/src/log.c Tue Jan 21 18:53:38 2014
@@ -46,7 +46,7 @@ ALLOC_DEFINE(qd_log_entry_t);
 
 DEQ_DECLARE(qd_log_entry_t, qd_log_list_t);
 
-static int            mask = LOG_INFO;
+static int            mask = QD_LOG_INFO;
 static qd_log_list_t  entries;
 static sys_mutex_t   *log_lock = 0;
 
@@ -54,13 +54,13 @@ static sys_mutex_t   *log_lock = 0;
 static const char *cls_prefix(int cls)
 {
     switch (cls) {
-    case LOG_TRACE    : return "TRACE";
-    case LOG_DEBUG    : return "DEBUG";
-    case LOG_INFO     : return "INFO";
-    case LOG_NOTICE   : return "NOTICE";
-    case LOG_WARNING  : return "WARNING";
-    case LOG_ERROR    : return "ERROR";
-    case LOG_CRITICAL : return "CRITICAL";
+    case QD_LOG_TRACE    : return "TRACE";
+    case QD_LOG_DEBUG    : return "DEBUG";
+    case QD_LOG_INFO     : return "INFO";
+    case QD_LOG_NOTICE   : return "NOTICE";
+    case QD_LOG_WARNING  : return "WARNING";
+    case QD_LOG_ERROR    : return "ERROR";
+    case QD_LOG_CRITICAL : return "CRITICAL";
     }
 
     return "";

Modified: qpid/dispatch/trunk/src/python_embedded.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/python_embedded.c?rev=1560144&r1=1560143&r2=1560144&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/python_embedded.c (original)
+++ qpid/dispatch/trunk/src/python_embedded.c Tue Jan 21 18:53:38 2014
@@ -64,7 +64,7 @@ void qd_python_start(void)
     if (ref_count == 0) {
         Py_Initialize();
         qd_python_setup();
-        qd_log(log_module, LOG_TRACE, "Embedded Python Interpreter Initialized");
+        qd_log(log_module, QD_LOG_TRACE, "Embedded Python Interpreter Initialized");
     }
     ref_count++;
     sys_mutex_unlock(lock);
@@ -79,7 +79,7 @@ void qd_python_stop(void)
         Py_DECREF(dispatch_module);
         dispatch_module = 0;
         Py_Finalize();
-        qd_log(log_module, LOG_TRACE, "Embedded Python Interpreter Shut Down");
+        qd_log(log_module, QD_LOG_TRACE, "Embedded Python Interpreter Shut Down");
     }
     sys_mutex_unlock(lock);
 }
@@ -642,7 +642,7 @@ static void qd_python_setup(void)
     IoAdapterType.tp_new  = PyType_GenericNew;
     if ((PyType_Ready(&LogAdapterType) < 0) || (PyType_Ready(&IoAdapterType) <
0)) {
         PyErr_Print();
-        qd_log(log_module, LOG_ERROR, "Unable to initialize Adapters");
+        qd_log(log_module, QD_LOG_ERROR, "Unable to initialize Adapters");
         assert(0);
     } else {
         PyObject *m = Py_InitModule3("dispatch", empty_methods, "Dispatch Adapter Module");
@@ -662,13 +662,13 @@ static void qd_python_setup(void)
         Py_INCREF(laType);
         PyModule_AddObject(m, "LogAdapter", (PyObject*) &LogAdapterType);
 
-        qd_register_log_constant(m, "LOG_TRACE",    LOG_TRACE);
-        qd_register_log_constant(m, "LOG_DEBUG",    LOG_DEBUG);
-        qd_register_log_constant(m, "LOG_INFO",     LOG_INFO);
-        qd_register_log_constant(m, "LOG_NOTICE",   LOG_NOTICE);
-        qd_register_log_constant(m, "LOG_WARNING",  LOG_WARNING);
-        qd_register_log_constant(m, "LOG_ERROR",    LOG_ERROR);
-        qd_register_log_constant(m, "LOG_CRITICAL", LOG_CRITICAL);
+        qd_register_log_constant(m, "LOG_TRACE",    QD_LOG_TRACE);
+        qd_register_log_constant(m, "LOG_DEBUG",    QD_LOG_DEBUG);
+        qd_register_log_constant(m, "LOG_INFO",     QD_LOG_INFO);
+        qd_register_log_constant(m, "LOG_NOTICE",   QD_LOG_NOTICE);
+        qd_register_log_constant(m, "LOG_WARNING",  QD_LOG_WARNING);
+        qd_register_log_constant(m, "LOG_ERROR",    QD_LOG_ERROR);
+        qd_register_log_constant(m, "LOG_CRITICAL", QD_LOG_CRITICAL);
 
         //
         PyTypeObject *ioaType = &IoAdapterType;

Modified: qpid/dispatch/trunk/src/router_config.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/router_config.c?rev=1560144&r1=1560143&r2=1560144&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/router_config.c (original)
+++ qpid/dispatch/trunk/src/router_config.c Tue Jan 21 18:53:38 2014
@@ -61,7 +61,7 @@ void qd_router_configure(qd_router_t *ro
 
         router->config_addrs[idx].semantics = semantics;
 
-        qd_log(MODULE, LOG_INFO, "Configured Address: prefix=%s fanout=%s bias=%s", prefix,
fanout, bias);
+        qd_log(MODULE, QD_LOG_INFO, "Configured Address: prefix=%s fanout=%s bias=%s", prefix,
fanout, bias);
     }
 }
 

Modified: qpid/dispatch/trunk/src/router_node.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/router_node.c?rev=1560144&r1=1560143&r2=1560144&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/router_node.c (original)
+++ qpid/dispatch/trunk/src/router_node.c Tue Jan 21 18:53:38 2014
@@ -232,7 +232,7 @@ static int qd_router_find_mask_bit_LH(qd
     if (qd_bitmask_first_set(router->neighbor_free_mask, &mask_bit)) {
         qd_bitmask_clear_bit(router->neighbor_free_mask, mask_bit);
     } else {
-        qd_log(module, LOG_CRITICAL, "Exceeded maximum inter-router link count");
+        qd_log(module, QD_LOG_CRITICAL, "Exceeded maximum inter-router link count");
         return -1;
     }
 
@@ -851,7 +851,7 @@ static int router_incoming_link_handler(
     int          is_router = qd_router_terminus_is_router(qd_link_remote_source(link));
 
     if (is_router && !qd_router_connection_is_inter_router(qd_link_connection(link)))
{
-        qd_log(module, LOG_WARNING, "Incoming link claims router capability but is not on
an inter-router connection");
+        qd_log(module, QD_LOG_WARNING, "Incoming link claims router capability but is not
on an inter-router connection");
         pn_link_close(pn_link);
         return 0;
     }
@@ -918,7 +918,7 @@ static int router_outgoing_link_handler(
     qd_address_semantics_t  semantics;
 
     if (is_router && !qd_router_connection_is_inter_router(qd_link_connection(link)))
{
-        qd_log(module, LOG_WARNING, "Outgoing link claims router capability but is not on
an inter-router connection");
+        qd_log(module, QD_LOG_WARNING, "Outgoing link claims router capability but is not
on an inter-router connection");
         pn_link_close(pn_link);
         return 0;
     }
@@ -945,7 +945,7 @@ static int router_outgoing_link_handler(
         if (prefix != 'M') {
             qd_field_iterator_free(iter);
             pn_link_close(pn_link);
-            qd_log(module, LOG_WARNING, "Rejected an outgoing endpoint link with a router
address: %s", r_src);
+            qd_log(module, QD_LOG_WARNING, "Rejected an outgoing endpoint link with a router
address: %s", r_src);
             return 0;
         }
     }
@@ -1004,9 +1004,9 @@ static int router_outgoing_link_handler(
             qd_router_generate_temp_addr(router, temp_addr, 1000);
             iter = qd_field_iterator_string(temp_addr, ITER_VIEW_ADDRESS_HASH);
             pn_terminus_set_address(qd_link_source(link), temp_addr);
-            qd_log(module, LOG_INFO, "Assigned temporary routable address: %s", temp_addr);
+            qd_log(module, QD_LOG_INFO, "Assigned temporary routable address: %s", temp_addr);
         } else
-            qd_log(module, LOG_INFO, "Registered local address: %s", r_src);
+            qd_log(module, QD_LOG_INFO, "Registered local address: %s", r_src);
 
         qd_hash_retrieve(router->addr_hash, iter, (void**) &addr);
         if (!addr) {
@@ -1080,7 +1080,7 @@ static int router_link_detach_handler(vo
         if (router->out_links_by_mask_bit[rlink->mask_bit] == rlink)
             router->out_links_by_mask_bit[rlink->mask_bit] = 0;
         else
-            qd_log(module, LOG_CRITICAL, "Outgoing router link closing but not in index:
bit=%d", rlink->mask_bit);
+            qd_log(module, QD_LOG_CRITICAL, "Outgoing router link closing but not in index:
bit=%d", rlink->mask_bit);
     }
 
     //
@@ -1119,7 +1119,7 @@ static void router_outbound_open_handler
     // role, ignore it.
     //
     if (!qd_router_connection_is_inter_router(conn)) {
-        qd_log(module, LOG_WARNING, "Outbound connection set up without inter-router role");
+        qd_log(module, QD_LOG_WARNING, "Outbound connection set up without inter-router role");
         return;
     }
 
@@ -1138,7 +1138,7 @@ static void router_outbound_open_handler
         qd_bitmask_clear_bit(router->neighbor_free_mask, mask_bit);
     } else {
         sys_mutex_unlock(router->lock);
-        qd_log(module, LOG_CRITICAL, "Exceeded maximum inter-router link count");
+        qd_log(module, QD_LOG_CRITICAL, "Exceeded maximum inter-router link count");
         return;
     }
 
@@ -1318,9 +1318,9 @@ qd_router_t *qd_router(qd_dispatch_t *qd
     srandom(seed);
 
     switch (router->router_mode) {
-    case QD_ROUTER_MODE_STANDALONE: qd_log(module, LOG_INFO, "Router started in Standalone
mode");  break;
-    case QD_ROUTER_MODE_INTERIOR:   qd_log(module, LOG_INFO, "Router started in Interior
mode, area=%s id=%s", area, id);  break;
-    case QD_ROUTER_MODE_EDGE:       qd_log(module, LOG_INFO, "Router started in Edge mode");
 break;
+    case QD_ROUTER_MODE_STANDALONE: qd_log(module, QD_LOG_INFO, "Router started in Standalone
mode");  break;
+    case QD_ROUTER_MODE_INTERIOR:   qd_log(module, QD_LOG_INFO, "Router started in Interior
mode, area=%s id=%s", area, id);  break;
+    case QD_ROUTER_MODE_EDGE:       qd_log(module, QD_LOG_INFO, "Router started in Edge mode");
 break;
     }
 
     return router;
@@ -1386,7 +1386,7 @@ qd_address_t *qd_router_register_address
     sys_mutex_unlock(router->lock);
 
     if (handler)
-        qd_log(module, LOG_INFO, "In-Process Address Registered: %s", address);
+        qd_log(module, QD_LOG_INFO, "In-Process Address Registered: %s", address);
     return addr;
 }
 

Modified: qpid/dispatch/trunk/src/router_pynode.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/router_pynode.c?rev=1560144&r1=1560143&r2=1560144&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/router_pynode.c (original)
+++ qpid/dispatch/trunk/src/router_pynode.c Tue Jan 21 18:53:38 2014
@@ -392,7 +392,7 @@ static PyObject* qd_map_destination(PyOb
 
     sys_mutex_unlock(router->lock);
 
-    qd_log(module, LOG_DEBUG, "Remote Destination '%s' Mapped to router %d", addr_string,
maskbit);
+    qd_log(module, QD_LOG_DEBUG, "Remote Destination '%s' Mapped to router %d", addr_string,
maskbit);
 
     Py_INCREF(Py_None);
     return Py_None;
@@ -438,7 +438,7 @@ static PyObject* qd_unmap_destination(Py
 
     qd_router_check_addr(router, addr, 0);
 
-    qd_log(module, LOG_DEBUG, "Remote Destination '%s' Unmapped from router %d", addr_string,
maskbit);
+    qd_log(module, QD_LOG_DEBUG, "Remote Destination '%s' Unmapped from router %d", addr_string,
maskbit);
 
     Py_INCREF(Py_None);
     return Py_None;
@@ -523,7 +523,7 @@ void qd_router_python_setup(qd_router_t 
     RouterAdapterType.tp_new = PyType_GenericNew;
     if (PyType_Ready(&RouterAdapterType) < 0) {
         PyErr_Print();
-        qd_log(module, LOG_CRITICAL, "Unable to initialize the Python Router Adapter");
+        qd_log(module, QD_LOG_CRITICAL, "Unable to initialize the Python Router Adapter");
         return;
     }
 
@@ -546,13 +546,13 @@ void qd_router_python_setup(qd_router_t 
     pModule = PyImport_Import(pName);
     Py_DECREF(pName);
     if (!pModule) {
-        qd_log(module, LOG_CRITICAL, "Can't Locate 'router' Python module");
+        qd_log(module, QD_LOG_CRITICAL, "Can't Locate 'router' Python module");
         return;
     }
 
     pClass = PyObject_GetAttrString(pModule, "RouterEngine");
     if (!pClass || !PyClass_Check(pClass)) {
-        qd_log(module, LOG_CRITICAL, "Can't Locate 'RouterEngine' class in the 'router' module");
+        qd_log(module, QD_LOG_CRITICAL, "Can't Locate 'RouterEngine' class in the 'router'
module");
         return;
     }
 
@@ -591,25 +591,25 @@ void qd_router_python_setup(qd_router_t 
 
     if (!router->pyRouter) {
         PyErr_Print();
-        qd_log(module, LOG_CRITICAL, "'RouterEngine' class cannot be instantiated");
+        qd_log(module, QD_LOG_CRITICAL, "'RouterEngine' class cannot be instantiated");
         return;
     }
 
     router->pyTick = PyObject_GetAttrString(router->pyRouter, "handleTimerTick");
     if (!router->pyTick || !PyCallable_Check(router->pyTick)) {
-        qd_log(module, LOG_CRITICAL, "'RouterEngine' class has no handleTimerTick method");
+        qd_log(module, QD_LOG_CRITICAL, "'RouterEngine' class has no handleTimerTick method");
         return;
     }
 
     router->pyAdded = PyObject_GetAttrString(router->pyRouter, "addressAdded");
     if (!router->pyAdded || !PyCallable_Check(router->pyAdded)) {
-        qd_log(module, LOG_CRITICAL, "'RouterEngine' class has no addressAdded method");
+        qd_log(module, QD_LOG_CRITICAL, "'RouterEngine' class has no addressAdded method");
         return;
     }
 
     router->pyRemoved = PyObject_GetAttrString(router->pyRouter, "addressRemoved");
     if (!router->pyRemoved || !PyCallable_Check(router->pyRemoved)) {
-        qd_log(module, LOG_CRITICAL, "'RouterEngine' class has no addressRemoved method");
+        qd_log(module, QD_LOG_CRITICAL, "'RouterEngine' class has no addressRemoved method");
         return;
     }
 }

Modified: qpid/dispatch/trunk/src/server.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/server.c?rev=1560144&r1=1560143&r2=1560144&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/server.c (original)
+++ qpid/dispatch/trunk/src/server.c Tue Jan 21 18:53:38 2014
@@ -103,7 +103,7 @@ static void thread_process_listeners(qd_
 
     while (listener) {
         cxtr = pn_listener_accept(listener);
-        qd_log(module, LOG_TRACE, "Accepting Connection from %s", pn_connector_name(cxtr));
+        qd_log(module, QD_LOG_TRACE, "Accepting Connection from %s", pn_connector_name(cxtr));
         ctx = new_qd_connection_t();
         DEQ_ITEM_INIT(ctx);
         ctx->state        = CONN_STATE_OPENING;
@@ -123,7 +123,7 @@ static void thread_process_listeners(qd_
         pn_connection_set_context(conn, ctx);
         ctx->pn_conn = conn;
 
-        qd_log(module, LOG_DEBUG, "added listener connection");
+        qd_log(module, QD_LOG_DEBUG, "added listener connection");
         // qd_server->lock is already locked
         DEQ_INSERT_TAIL(qd_server->connections, ctx);
 
@@ -291,7 +291,7 @@ static int process_connector(qd_server_t
                 ctx->state = CONN_STATE_FAILED;
                 if (ctx->connector) {
                     const qd_server_config_t *config = ctx->connector->config;
-                    qd_log(module, LOG_TRACE, "Connection to %s:%s failed", config->host,
config->port);
+                    qd_log(module, QD_LOG_TRACE, "Connection to %s:%s failed", config->host,
config->port);
                 }
             }
         }
@@ -443,7 +443,7 @@ static void *thread_run(void *arg)
                         error = pn_driver_errno(qd_server->driver);
                 } while (error == PN_INTR);
                 if (error) {
-                    qd_log(module, LOG_ERROR, "Driver Error: %s", pn_driver_error(qd_server->driver));
+                    qd_log(module, QD_LOG_ERROR, "Driver Error: %s", pn_driver_error(qd_server->driver));
                     exit(-1);
                 }
 
@@ -538,7 +538,7 @@ static void *thread_run(void *arg)
 
                 sys_mutex_lock(qd_server->lock);
                 DEQ_REMOVE(qd_server->connections, ctx);
-                qd_log(module, LOG_DEBUG, "removed %s connection",
+                qd_log(module, QD_LOG_DEBUG, "removed %s connection",
                         ctx->connector ? "connector" : "listener");
                 free_qd_connection_t(ctx);
                 pn_connector_free(work);
@@ -634,12 +634,12 @@ static void cxtr_try_open(void *context)
     sys_mutex_lock(ct->server->lock);
     ctx->pn_cxtr = pn_connector(ct->server->driver, ct->config->host, ct->config->port,
(void*) ctx);
     DEQ_INSERT_TAIL(ct->server->connections, ctx);
-    qd_log(module, LOG_DEBUG, "added connector connection");
+    qd_log(module, QD_LOG_DEBUG, "added connector connection");
     sys_mutex_unlock(ct->server->lock);
 
     ct->ctx   = ctx;
     ct->delay = 5000;
-    qd_log(module, LOG_TRACE, "Connecting to %s:%s", ct->config->host, ct->config->port);
+    qd_log(module, QD_LOG_TRACE, "Connecting to %s:%s", ct->config->host, ct->config->port);
 }
 
 
@@ -680,7 +680,7 @@ qd_server_t *qd_server(int thread_count,
     qd_server->pause_now_serving   = 0;
     qd_server->pending_signal      = 0;
 
-    qd_log(module, LOG_INFO, "Container Name: %s", qd_server->container_name);
+    qd_log(module, QD_LOG_INFO, "Container Name: %s", qd_server->container_name);
 
     return qd_server;
 }
@@ -733,9 +733,9 @@ void qd_server_set_user_fd_handler(qd_di
 
 static void qd_server_announce(qd_server_t* qd_server)
 {
-    qd_log(module, LOG_INFO, "Operational, %d Threads Running", qd_server->thread_count);
+    qd_log(module, QD_LOG_INFO, "Operational, %d Threads Running", qd_server->thread_count);
 #ifndef NDEBUG
-    qd_log(module, LOG_INFO, "Running in DEBUG Mode");
+    qd_log(module, QD_LOG_INFO, "Running in DEBUG Mode");
 #endif
 }
 
@@ -760,7 +760,7 @@ void qd_server_run(qd_dispatch_t *qd)
     for (i = 1; i < qd_server->thread_count; i++)
         thread_join(qd_server->threads[i]);
 
-    qd_log(module, LOG_INFO, "Shut Down");
+    qd_log(module, QD_LOG_INFO, "Shut Down");
 }
 
 
@@ -796,7 +796,7 @@ void qd_server_stop(qd_dispatch_t *qd)
     if (thread_server != qd_server) {
         for (idx = 0; idx < qd_server->thread_count; idx++)
             thread_join(qd_server->threads[idx]);
-        qd_log(module, LOG_INFO, "Shut Down");
+        qd_log(module, QD_LOG_INFO, "Shut Down");
     }
 }
 
@@ -920,12 +920,12 @@ qd_listener_t *qd_server_listen(qd_dispa
     li->pn_listener = pn_listener(qd_server->driver, config->host, config->port,
(void*) li);
 
     if (!li->pn_listener) {
-        qd_log(module, LOG_ERROR, "Driver Error %d (%s)",
+        qd_log(module, QD_LOG_ERROR, "Driver Error %d (%s)",
                pn_driver_errno(qd_server->driver), pn_driver_error(qd_server->driver));
         free_qd_listener_t(li);
         return 0;
     }
-    qd_log(module, LOG_TRACE, "Listening on %s:%s", config->host, config->port);
+    qd_log(module, QD_LOG_TRACE, "Listening on %s:%s", config->host, config->port);
 
     return li;
 }

Modified: qpid/dispatch/trunk/tests/compose_test.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/tests/compose_test.c?rev=1560144&r1=1560143&r2=1560144&view=diff
==============================================================================
--- qpid/dispatch/trunk/tests/compose_test.c (original)
+++ qpid/dispatch/trunk/tests/compose_test.c Tue Jan 21 18:53:38 2014
@@ -281,7 +281,7 @@ static char *test_compose_scalars(void *
 int compose_tests()
 {
     int result = 0;
-    qd_log_set_mask(LOG_NONE);
+    qd_log_set_mask(QD_LOG_NONE);
 
     TEST_CASE(test_compose_list_of_maps, 0);
     TEST_CASE(test_compose_nested_composites, 0);

Modified: qpid/dispatch/trunk/tests/parse_test.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/tests/parse_test.c?rev=1560144&r1=1560143&r2=1560144&view=diff
==============================================================================
--- qpid/dispatch/trunk/tests/parse_test.c (original)
+++ qpid/dispatch/trunk/tests/parse_test.c Tue Jan 21 18:53:38 2014
@@ -156,7 +156,7 @@ static char *test_parser_errors(void *co
 int parse_tests()
 {
     int result = 0;
-    qd_log_set_mask(LOG_NONE);
+    qd_log_set_mask(QD_LOG_NONE);
 
     TEST_CASE(test_parser_fixed_scalars, 0);
     TEST_CASE(test_parser_errors, 0);

Modified: qpid/dispatch/trunk/tests/server_test.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/tests/server_test.c?rev=1560144&r1=1560143&r2=1560144&view=diff
==============================================================================
--- qpid/dispatch/trunk/tests/server_test.c (original)
+++ qpid/dispatch/trunk/tests/server_test.c Tue Jan 21 18:53:38 2014
@@ -195,7 +195,7 @@ int server_tests(const char *_config_fil
 {
     int result = 0;
     test_lock = sys_mutex();
-    qd_log_set_mask(LOG_NONE);
+    qd_log_set_mask(QD_LOG_NONE);
 
     config_file = _config_file;
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message