OSDN Git Service

Re-numbering duplicated log.
authorKohei TANUMA <tanuma@users.sourceforge.jp>
Mon, 17 Aug 2009 05:54:38 +0000 (14:54 +0900)
committerKohei TANUMA <tanuma@users.sourceforge.jp>
Mon, 17 Aug 2009 05:54:38 +0000 (14:54 +0900)
src/conn.c
src/replication.c
src/service.c

index 4b74ddb..fa184f2 100644 (file)
@@ -75,7 +75,7 @@ l7vs_conn_init(void)
 {
     /*-------- DEBUG LOG --------*/
     if (LOG_LV_DEBUG == logger_get_log_level(LOG_CAT_L7VSD_NETWORK)) {
-        LOGGER_PUT_LOG_DEBUG(LOG_CAT_L7VSD_NETWORK,341,
+        LOGGER_PUT_LOG_DEBUG(LOG_CAT_L7VSD_NETWORK,353,
             "in_function: int lvs_conn_init() ");
     }
     /*------ DEBUG LOG END ------*/
@@ -412,7 +412,7 @@ l7vs_conn_create(int lfd, struct l7vs_lsock *lsock)
         struct l7vs_dest* dest;
         conn->ciom->status = iomux_conn_received;
         if (!l7vs_conn_is_rs_connected(conn->ciom, conn, &srv, &dest)) {
-            LOGGER_PUT_LOG_ERROR(LOG_CAT_L7VSD_NETWORK,16, "error / is realserver connected failed");
+            LOGGER_PUT_LOG_ERROR(LOG_CAT_L7VSD_NETWORK,38, "error / is realserver connected failed");
         }
         else {
             switch (conn->ciom->status) {
@@ -422,12 +422,12 @@ l7vs_conn_create(int lfd, struct l7vs_lsock *lsock)
             case iomux_conn_service_selected:
                 //service and destination were selected then attempt to connect the real server
                 if (!l7vs_conn_connection_establish(conn->ciom, conn, srv, dest)) {
-                    LOGGER_PUT_LOG_ERROR(LOG_CAT_L7VSD_NETWORK,17, "error / client connect rs failed");
+                    LOGGER_PUT_LOG_ERROR(LOG_CAT_L7VSD_NETWORK,39, "error / client connect rs failed");
                 }
                 break;
             default:
                 //invalid status
-                LOGGER_PUT_LOG_ERROR(LOG_CAT_L7VSD_PROGRAM,34, "error / invalid status(%d)", conn->ciom->status);
+                LOGGER_PUT_LOG_ERROR(LOG_CAT_L7VSD_PROGRAM,79, "error / invalid status(%d)", conn->ciom->status);
                 break;
             }
         }
@@ -1261,7 +1261,8 @@ l7vs_conn_is_rs_connected(struct l7vs_iomux *iom, struct l7vs_conn *conn, struct
     if (conn->srv) {
         ret = conn->srv->pm->analyze_cldata(conn->srv, conn, conn->cldata, &conn->cldata_len);
         if (ret != 0) {
-            // XXX
+            LOGGER_PUT_LOG_INFO(LOG_CAT_L7VSD_PROTOCOL,19,
+                "Failed to modify client data: %d", ret);
         }
     }
 
@@ -2484,7 +2485,7 @@ l7vs_conn_recv(struct l7vs_iomux *iom, int source_fd)
     if( (source_fd == conn->riom->fd) && !l7vs_conn_QoS_control( conn, QOS_DOWN ) ){
         /*-------- DEBUG LOG --------*/
         if (LOG_LV_DEBUG == logger_get_log_level(LOG_CAT_L7VSD_NETWORK)) {
-            LOGGER_PUT_LOG_DEBUG(LOG_CAT_L7VSD_NETWORK,223,
+            LOGGER_PUT_LOG_DEBUG(LOG_CAT_L7VSD_NETWORK,346,
                 "iom->status change: %d->%d",
                 iom->status, iomux_conn_receiving);
         }
@@ -2492,7 +2493,7 @@ l7vs_conn_recv(struct l7vs_iomux *iom, int source_fd)
         iom->status = iomux_conn_receiving;
         /*-------- DEBUG LOG --------*/
         if (LOG_LV_DEBUG == logger_get_log_level(LOG_CAT_L7VSD_NETWORK)) {
-            LOGGER_PUT_LOG_DEBUG(LOG_CAT_L7VSD_NETWORK,224,
+            LOGGER_PUT_LOG_DEBUG(LOG_CAT_L7VSD_NETWORK,347,
                 "out_function: static int l7vs_conn_recv(struct l7vs_iomux *iom, int source_fd) "
                 "return_value: 1");
         }
@@ -3567,7 +3568,7 @@ l7vs_conn_QoS_control( struct l7vs_conn *conn, int direction )
     if (!conn->srv) {
         /*-------- DEBUG LOG --------*/
         if (LOG_LV_DEBUG == logger_get_log_level(LOG_CAT_L7VSD_NETWORK)) {
-            LOGGER_PUT_LOG_DEBUG(LOG_CAT_L7VSD_NETWORK,317,
+            LOGGER_PUT_LOG_DEBUG(LOG_CAT_L7VSD_NETWORK,348,
                 "out_function: static int l7vs_conn_QoS_control( struct l7vs_conn *conn, int direction ) "
                 "return_value: 1");
         }
@@ -3626,8 +3627,8 @@ l7vs_conn_QoS_control( struct l7vs_conn *conn, int direction )
         //QoS Control check : to client
         conn->srv->throughput_to_client = conn->srv->cur_recvsize_from_server * 1000000ULL / throughput_interval;
         if (LOG_LV_DEBUG == logger_get_log_level(LOG_CAT_L7VSD_NETWORK)) {
-            LOGGER_PUT_LOG_DEBUG(LOG_CAT_L7VSD_NETWORK,323, "QoS threshold to client:%lld ", conn->srv->qos_threshold_down);
-            LOGGER_PUT_LOG_DEBUG(LOG_CAT_L7VSD_NETWORK,324, "(current throughput:%lld)", conn->srv->throughput_to_client);
+            LOGGER_PUT_LOG_DEBUG(LOG_CAT_L7VSD_NETWORK,349, "QoS threshold to client:%lld ", conn->srv->qos_threshold_down);
+            LOGGER_PUT_LOG_DEBUG(LOG_CAT_L7VSD_NETWORK,350, "(current throughput:%lld)", conn->srv->throughput_to_client);
         }
         if( (conn->srv->qos_threshold_down) && (conn->srv->throughput_to_client + l7vs_conn_read_bufsize > conn->srv->qos_threshold_down) ){
             if (conn->srv->qos_down_flag == 0) {
@@ -3636,7 +3637,7 @@ l7vs_conn_QoS_control( struct l7vs_conn *conn, int direction )
             }
             /*-------- DEBUG LOG --------*/
             if (LOG_LV_DEBUG == logger_get_log_level(LOG_CAT_L7VSD_NETWORK)) {
-                LOGGER_PUT_LOG_DEBUG(LOG_CAT_L7VSD_NETWORK,326,
+                LOGGER_PUT_LOG_DEBUG(LOG_CAT_L7VSD_NETWORK,351,
                     "out_function: static int l7vs_conn_QoS_control( struct l7vs_conn *conn, int direction ) "
                     "return_value: 0");
             }
@@ -3723,7 +3724,7 @@ l7vs_conn_QoS_recvsize_register( struct l7vs_conn *conn, const size_t in_recvsiz
             "tv_usec=%ld}"
             , CurrTime.tv_sec
             , CurrTime.tv_usec);
-        LOGGER_PUT_LOG_DEBUG(LOG_CAT_L7VSD_NETWORK,339,
+        LOGGER_PUT_LOG_DEBUG(LOG_CAT_L7VSD_NETWORK,352,
             "gettimeofday result: CurrTime=%s",
             time_str);
     }
index 53b3762..33e72db 100644 (file)
@@ -2801,7 +2801,7 @@ static int l7vs_replication_recv_sock_init( )
        if ( internal_val.socket < 3 ) 
        {
                errsv = errno;
-               LOGGER_PUT_LOG_ERROR(LOG_CAT_L7VSD_SYSTEM_SOCKET,32,
+               LOGGER_PUT_LOG_ERROR(LOG_CAT_L7VSD_SYSTEM_SOCKET,34,
                                        "Make recv socket error : %s ai_family:%d ai_socktype:%d ai_protocol:%d",
                                        strerror(errsv),
                                        PF_INET,
@@ -3571,7 +3571,7 @@ static int getNICAddressInfo( const char* nicname, struct addressinfo* info )
 
        // Debug log
        if (logger_get_log_level(LOG_CAT_L7VSD_SYSTEM) == LOG_LV_DEBUG){
-               LOGGER_PUT_LOG_DEBUG(LOG_CAT_L7VSD_SYSTEM,1,
+               LOGGER_PUT_LOG_DEBUG(LOG_CAT_L7VSD_SYSTEM,2,
                                "Use ioctl() :"
                                "in_function : static int getNICAddressInfo( const char* nicname, struct addressinfo* info )"
                                "nicname = %p"
index 92a0b1b..5b632b9 100644 (file)
@@ -177,7 +177,7 @@ set_replication_data( unsigned int num, struct l7vs_service_repdata* rep_data, l
                        char    debugstr[DEBUG_STR_LEN];
                        memset( debugstr, 0, DEBUG_STR_LEN );
                        sprintf( debugstr, "memory allocated : address = %p , size = %zu", s, sizeof(struct l7vs_service) );
-                       LOGGER_PUT_LOG_DEBUG( LOG_CAT_L7VSD_VIRTUAL_SERVICE, 94, debugstr );
+                       LOGGER_PUT_LOG_DEBUG( LOG_CAT_L7VSD_VIRTUAL_SERVICE, 99, debugstr );
                }
                s->handle = TEMP_SERVICEHANDLE;
                ret = pmod->create( rep_data[i].protomod_arg, s->handle );
@@ -842,7 +842,7 @@ l7vs_service_create(struct l7vs_service_arg_multi *arg, int *err)
                                char    debugstr[DEBUG_STR_LEN];
                                memset( debugstr, 0, DEBUG_STR_LEN );
                                sprintf( debugstr, "memory allocated : address = %p , size = %d", rep_mirror, (rep_size_num * sizeof(struct l7vs_service_repdata)) );
-                               LOGGER_PUT_LOG_DEBUG( LOG_CAT_L7VSD_VIRTUAL_SERVICE, 95, debugstr );
+                               LOGGER_PUT_LOG_DEBUG( LOG_CAT_L7VSD_VIRTUAL_SERVICE, 100, debugstr );
                        }
                }
                // if replication data mirror isn't NULL, get a rep_mirror area.
@@ -1672,6 +1672,6 @@ l7vs_service_update_throughput( struct l7vs_service* srv, unsigned long long cur
         srv->cur_recvsize_from_server = 0;
     }
        if ( LOG_LV_DEBUG == logger_get_log_level(LOG_CAT_L7VSD_NETWORK_BANDWIDTH) ) {
-               LOGGER_PUT_LOG_DEBUG(LOG_CAT_L7VSD_VIRTUAL_SERVICE,2,"out_function: void l7vs_service_update_throughput(struct l7vs_service* srv, unsigned long long current_time)");
+               LOGGER_PUT_LOG_DEBUG(LOG_CAT_L7VSD_VIRTUAL_SERVICE,98,"out_function: void l7vs_service_update_throughput(struct l7vs_service* srv, unsigned long long current_time)");
        }
 }