upstream_buffer_size(8192),
downstream_buffer_size(8192),
virtualservice_endpoint(listen_endpoint),
- accesslog_flag(false),
+ access_log_flag(false),
access_logger(set_access_logger),
ssl_flag(ssl_mode),
client_ssl_socket(session_io, set_ssl_context,set_option),
return;
case ACCESS_LOG_ON:
{
- rw_scoped_lock scope_lock(accesslog_flag_mutex);
- accesslog_flag = true;
+ rw_scoped_lock scope_lock(access_log_flag_mutex);
+ access_log_flag = true;
}
//----Debug log----------------------------------------------------------------------
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))){
return;
case ACCESS_LOG_OFF:
{
- rw_scoped_lock scope_lock(accesslog_flag_mutex);
- accesslog_flag = false;
+ rw_scoped_lock scope_lock(access_log_flag_mutex);
+ access_log_flag = false;
}
//----Debug log----------------------------------------------------------------------
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))){
};
//! access log out put flag
bool get_accesslog_flag(){
- return accesslog_flag;
+ return access_log_flag;
};
//! access logger
l7vs::logger_implement_access* get_access_logger(){
bool& get_session_pause_flag(){
return session_pause_flag;
}
+
+ bool& get_access_log_flag(){
+ return access_log_flag;
+ }
l7vs::lockfree_queue<l7vs::tcp_thread_message>& get_up_thread_message_que(){
return up_thread_message_que;
bool& ref_pause_flag = test_obj.get_session_pause_flag();
+ bool& ref_access_log_flag = test_obj.get_access_log_flag();
l7vs::lockfree_queue<l7vs::tcp_thread_message>& ref_up_msg_que = test_obj.get_up_thread_message_que();
l7vs::lockfree_queue<l7vs::tcp_thread_message>& ref_dw_msg_que = test_obj.get_down_thread_message_que();
l7vs::tcp_thread_message* up_msg;
test_obj.set_virtual_service_message(l7vs::tcp_session::SESSION_PAUSE_OFF);
BOOST_CHECK(!ref_pause_flag);
- // unit_test [6] set_virtual_service_message up thread map find not message error
- std::cout << "[6] set_virtual_service_message up thread map find not message error" << std::endl;
+ // unit_test [6] set_virtual_service_message ACCESS_LOG_ON
+ std::cout << "[6] set_virtual_service_message ACCESS_LOG__ON" << std::endl;
+ ref_access_log_flag = false;
+ test_obj.set_virtual_service_message(l7vs::tcp_session::ACCESS_LOG_ON);
+ BOOST_CHECK(ref_access_log_flag);
+
+ // unit_test [7] set_virtual_service_message ACCESS_LOG_OFF
+ std::cout << "[7] set_virtual_service_message ACCESS_LOG_OFF" << std::endl;
+ ref_access_log_flag = true;
+ test_obj.set_virtual_service_message(l7vs::tcp_session::ACCESS_LOG_OFF);
+ BOOST_CHECK(!ref_access_log_flag);
+
+ // unit_test [8] set_virtual_service_message up thread map find not message error
+ std::cout << "[8] set_virtual_service_message up thread map find not message error" << std::endl;
ref_vs_up_msg_map.clear();
l7vs::Logger::putLogError_category = l7vs::LOG_CAT_NONE;
l7vs::Logger::putLogError_id = 0;
BOOST_CHECK_EQUAL(6,l7vs::Logger::putLogError_id);
std::cout << l7vs::Logger::putLogError_message << std::endl;
- // unit_test [7] set_virtual_service_message up thread map find not message error
- std::cout << "[7] set_virtual_service_message up thread map find not message error" << std::endl;
+ // unit_test [9] set_virtual_service_message up thread map find not message error
+ std::cout << "[9] set_virtual_service_message up thread map find not message error" << std::endl;
ref_vs_dw_msg_map.clear();
l7vs::Logger::putLogError_category = l7vs::LOG_CAT_NONE;
l7vs::Logger::putLogError_id = 0;