//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_opt_list_numeric_func( int& pos, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_opt_list_numeric_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 2, "l7vsadm::parse_opt_list_numeric_func", __FILE__, __LINE__ );
numeric_flag = true; //numeric flag on.
return true;
//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_vs_func( l7vs::l7vsadm_request::COMMAND_CODE_TAG cmd, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_vs_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 3, "l7vsadm::parse_vs_func", __FILE__, __LINE__ );
request.command = cmd; // set command
for( int pos = 2; pos < argc; ++pos ){ // check options.
std::stringstream buf;
buf << "virtualservice option not found:" << argv[pos];
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 2, buf.str(), __FILE__, __LINE__ );
return false;
}
}
std::stringstream buf;
buf << "scheduler module load error:" << scheduler_name;
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 3, buf.str(), __FILE__, __LINE__ );
return false;
}
if( !module ){
std::stringstream buf;
buf << "scheduler module not found:" << scheduler_name;
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 4, buf.str(), __FILE__, __LINE__ );
return false;
}
ctrl.unload_module( module );
//protocol module name error
std::string buf("protocol module not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 5, buf, __FILE__, __LINE__ );
return false;
}
if( request.vs_element.udpmode ){
// udp mode,but not acceptor endpoint
std::string buf("udp recv endpoint not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 6, buf, __FILE__, __LINE__ );
return false;
}
}
// tcp mode, but not acceptor endpoint
std::string buf("tcp accpeptor endpoint not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 7, buf, __FILE__, __LINE__ );
return false;
}
}
if( 0 > request.vs_element.sorry_maxconnection ){
std::string buf("invalid sorry_maxconnection value.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 8, buf, __FILE__, __LINE__ );
return false;
}
return true;
//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_opt_vs_target_func( int& pos, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_opt_vs_target_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 4, "l7vsadm::parse_opt_vs_target_func", __FILE__, __LINE__ );
if( ++pos >= argc ){
//don't target recvaddress:port
std::string buf("target endpoint is not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 9, buf, __FILE__, __LINE__ );
return false;
}
// get host endpoint from string
std::stringstream buf;
buf << "target endpoint parse error:" << err.get_message() << src_str;
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 10, buf.str(), __FILE__, __LINE__ );
return false;
}
check_endpoint<boost::asio::ip::udp>( request.vs_element.udp_recv_endpoint, err );
std::stringstream buf;
buf << "target endpoint parse error:" << err.get_message() << src_str;
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 11, buf.str(), __FILE__, __LINE__ );
return false;
}
}
std::stringstream buf;
buf << "target endpoint parse error:" << err.get_message() << src_str;
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 12, buf.str(), __FILE__, __LINE__ );
return false;
}
check_endpoint<boost::asio::ip::tcp>( request.vs_element.tcp_accept_endpoint, err );
std::stringstream buf;
buf << "target endpoint parse error:" << err.get_message() << src_str;
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 13, buf.str(), __FILE__, __LINE__ );
return false;
}
}
//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_opt_vs_module_func( int& pos, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_opt_vs_module_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 5, "l7vsadm::parse_opt_vs_module_func", __FILE__, __LINE__ );
if( ++pos >= argc ){
//don't target protomod name.
std::string buf("protomod name is not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 14, buf, __FILE__, __LINE__ );
return false;
}
std::string module_name = argv[pos];
if( L7VS_MODNAME_LEN < module_name.length() ){
std::string buf("protomod name is too long.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 15, buf, __FILE__, __LINE__ );
return false;
}
protocol_module_control& ctrl = protocol_module_control::getInstance();
std::stringstream buf;
buf << "protocol module load error:" << module_name;
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 16, buf.str(), __FILE__, __LINE__ );
return false;
}
if( !module ){
std::stringstream buf;
buf << "protocol module not found:" << module_name;
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 17, buf.str(), __FILE__, __LINE__ );
return false;
}
module->init_logger_functions(
std::stringstream buf;
buf << "protocol module argument error: " << module_message.message;
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 18, buf.str(), __FILE__, __LINE__ );
return false;
}
request.vs_element.protocol_module_name = module_name;
//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_opt_vs_scheduler_func( int& pos, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_opt_vs_scheduler_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 6, "l7vsadm::parse_opt_vs_scheduler_func", __FILE__, __LINE__ );
if( ++pos >= argc ){
// don't target scheduler name.
std::string buf("scheduler name is not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 19, buf, __FILE__, __LINE__ );
return false;
}
//schedule module check.
if( L7VS_MODNAME_LEN < scheduler_name.length() ){
std::string buf("scheduler name is too long.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 20, buf, __FILE__, __LINE__ );
return false;
}
schedule_module_control& ctrl = schedule_module_control::getInstance();
std::stringstream buf;
buf << "scheduler module load error:" << scheduler_name;
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 21, buf.str(), __FILE__, __LINE__ );
return false;
}
if( !module ){
std::stringstream buf;
buf << "scheduler module not found:" << scheduler_name;
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 22, buf.str(), __FILE__, __LINE__ );
return false;
}
ctrl.unload_module( module );
//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_opt_vs_upper_func( int& pos, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_opt_vs_upper_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 7, "l7vsadm::parse_opt_vs_upper_func", __FILE__, __LINE__ );
if( ++pos >= argc ){
// don't target maxconnection_num
std::string buf("maxconnection value is not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 23, buf, __FILE__, __LINE__ );
return false;
}
try{
( 100000LL < request.vs_element.sorry_maxconnection ) ){
std::string buf("invalid sorry_maxconnection value.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 24, buf, __FILE__, __LINE__ );
return false;
}
if( 0LL == request.vs_element.sorry_maxconnection )
// don't convert argv[pos] is
std::string buf("invalid sorry_maxconnection value.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 25, buf, __FILE__, __LINE__ );
return false;
}
//check connection limit and zero
//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_opt_vs_bypass_func( int& pos, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_opt_vs_bypass_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 8, "l7vsadm::parse_opt_vs_bypass_func", __FILE__, __LINE__ );
if( ++pos >= argc ){
//don't target sorryserver:port
std::string buf("sorryserver endpoint is not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 26, buf, __FILE__, __LINE__ );
return false;
}
std::string sorry_endpoint = argv[pos];
std::stringstream buf;
buf << "sorryserver endpoint parse error:" << err.get_message() << sorry_endpoint;
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 27, buf.str(), __FILE__, __LINE__ );
return false;
}
// clear endpoint check
std::stringstream buf;
buf << "sorryserver endpoint parse error:" << err.get_message() << clear_endpoint;
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 28, buf.str(), __FILE__, __LINE__ );
return false;
}
}
std::stringstream buf;
buf << "sorryserver endpoint parse error:" << err.get_message() << sorry_endpoint;
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 29, buf.str(), __FILE__, __LINE__ );
return false;
}
}
//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_opt_vs_flag_func( int& pos, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_opt_vs_flag_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 9, "l7vsadm::parse_opt_vs_flag_func", __FILE__, __LINE__ );
if( ++pos >= argc ){
//don't target sorry flag
std::string buf("sorryflag value is not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 30, buf, __FILE__, __LINE__ );
return false;
}
try{
if( ( 0 != tmp ) && ( 1 != tmp ) ){
std::string buf("invalid sorryflag value.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 31, buf, __FILE__, __LINE__ );
return false;
}
if( 0 == tmp )
// don't convert argv[pos] is
std::string buf("invalid sorryflag value.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 32, buf, __FILE__, __LINE__ );
return false;
}
return true; //
//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_opt_vs_qosup_func( int& pos, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_opt_vs_qosup_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 10, "l7vsadm::parse_opt_vs_qosup_func", __FILE__, __LINE__ );
if( ++pos >= argc ){
//don't rarget QoS upstream value.
std::string buf("qos_upstream value is not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 33, buf, __FILE__, __LINE__ );
return false;
}
try{
if( ( ULLONG_MAX / 1024 / 1024 / 1024 ) < ullval ){
std::string buf("qos_upstream value is too big.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 34, buf, __FILE__, __LINE__ );
return false;
}
elem.qos_upstream = ullval * 1024 * 1024 * 1024; // set qos_upstream
if( ( ULLONG_MAX / 1024 / 1024 ) < ullval ){
std::string buf("qos_upstream value is too big.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 35, buf, __FILE__, __LINE__ );
return false;
}
elem.qos_upstream = ullval * 1024 * 1024; // set qos_upstream
if( ( ULLONG_MAX / 1024 ) < ullval ){
std::string buf("qos_upstream value is too big.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 36, buf, __FILE__, __LINE__ );
return false;
}
elem.qos_upstream = ullval * 1024; // set qos_upstream
// don't conv qos upstream
std::string buf("invalid qos_upstream value.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 37, buf, __FILE__, __LINE__ );
return false;
}
return true;
//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_opt_vs_qosdown_func( int& pos, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_opt_vs_qosdown_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 11, "l7vsadm::parse_opt_vs_qosdown_func", __FILE__, __LINE__ );
if( ++pos >= argc ){
// don't target QoS downstream value
std::string buf("qos_downstream value is not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 38, buf, __FILE__, __LINE__ );
return false;
}
try{
if( ( ULLONG_MAX / 1024 / 1024 / 1024 ) < ullval ){
std::string buf("qos_downstream value is too big.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 39, buf, __FILE__, __LINE__ );
return false;
}
elem.qos_downstream = ullval * 1024 * 1024 * 1024; // set qos_upstream
if( ( ULLONG_MAX / 1024 / 1024 ) < ullval ){
std::string buf("qos_downstream value is too big.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 40, buf, __FILE__, __LINE__ );
return false;
}
elem.qos_downstream = ullval * 1024 * 1024; // set qos_upstream
if( ( ULLONG_MAX / 1024 ) < ullval ){
std::string buf("qos_downstream value is too big.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 41, buf, __FILE__, __LINE__ );
return false;
}
elem.qos_downstream = ullval * 1024; // set qos_upstream
// don' conv qos downstream
std::string buf("invalid qos_downstream value.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 42, buf, __FILE__, __LINE__ );
return false;
}
return true;
//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_opt_vs_udp_func( int& pos, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_opt_vs_udp_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 12, "l7vsadm::parse_opt_vs_udp_func", __FILE__, __LINE__ );
virtualservice_element& elem = request.vs_element; // request virtualservie element reference get.
elem.udpmode = true; // udpmode on.
std::stringstream buf;
buf << "target endpoint parse error:" << err.get_message() << endpoint;
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 43, buf.str(), __FILE__, __LINE__ );
return false;
}
elem.tcp_accept_endpoint = zeropoint;
std::stringstream buf;
buf << "realserver endpoint parse error:" << err.get_message() << endpoint;
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 44, buf.str(), __FILE__, __LINE__ );
return false;
}
elem.realserver_vector.front().tcp_endpoint = zeropoint;
//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_rs_func( l7vs::l7vsadm_request::COMMAND_CODE_TAG cmd, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_rs_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 13, "l7vsadm::parse_rs_func", __FILE__, __LINE__ );
request.command = cmd;
request.vs_element.realserver_vector.push_back( realserver_element() );
std::stringstream buf;
buf << "realserver option not found:" << argv[pos];
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 45, buf.str(), __FILE__, __LINE__ );
return false;
}
}
//protocol module name error
std::string buf("protocol module not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 46, buf, __FILE__, __LINE__ );
return false;
}
if( request.vs_element.udpmode ){
// udp mode,but not acceptor endpoint
std::string buf("udp recv endpoint not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 47, buf, __FILE__, __LINE__ );
return false;
}
if( request.vs_element.realserver_vector.front().udp_endpoint == boost::asio::ip::udp::endpoint() ){
// udp mode,but not realserver endpoint
std::string buf("realserver udp endpoint not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 48, buf, __FILE__, __LINE__ );
return false;
}
}
// tcp mode, but not acceptor endpoint
std::string buf("tcp accpeptor endpoint not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 49, buf, __FILE__, __LINE__ );
return false;
}
if( request.vs_element.realserver_vector.front().tcp_endpoint == boost::asio::ip::tcp::endpoint() ){
// tcp mode,but not realserver endpoint
std::string buf("realserver tcp endpoint not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 50, buf, __FILE__, __LINE__ );
return false;
}
}
//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_opt_rs_weight_func( int& pos, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_opt_rs_weight_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 14, "l7vsadm::parse_opt_rs_weight_func", __FILE__, __LINE__ );
if( ++pos >= argc ){
//don't target weight value
std::string buf("weight value is not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 51, buf, __FILE__, __LINE__ );
return false;
}
try{
( 100 < request.vs_element.realserver_vector.front().weight ) ){
std::string buf("invalid weight value.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 52, buf, __FILE__, __LINE__ );
return false;
}
}
// lexical cast error
std::string buf("invalid weight value.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 53, buf, __FILE__, __LINE__ );
return false;
}
return true;
//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_opt_rs_realserver_func( int& pos, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_opt_rs_realserver_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 15, "l7vsadm::parse_opt_rs_realserver_func", __FILE__, __LINE__ );
if( ++pos >= argc ){
// don't target realserver address
std::string buf("realserver address is not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 54, buf, __FILE__, __LINE__ );
return false;
}
std::string src_str = argv[pos];
std::stringstream buf;
buf << "realserver endpoint parse error:" << err.get_message() << src_str;
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 55, buf.str(), __FILE__, __LINE__ );
return false;
}
check_endpoint<boost::asio::ip::udp>( request.vs_element.realserver_vector.front().udp_endpoint, err );
std::stringstream buf;
buf << "realserver endpoint parse error:" << err.get_message() << src_str;
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 56, buf.str(), __FILE__, __LINE__ );
return false;
}
}
std::stringstream buf;
buf << "realserver endpoint parse error:" << err.get_message() << src_str;
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 57, buf.str(), __FILE__, __LINE__ );
return false;
}
check_endpoint<boost::asio::ip::tcp>( request.vs_element.realserver_vector.front().tcp_endpoint, err );
std::stringstream buf;
buf << "realserver endpoint parse error:" << err.get_message() << src_str;
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 58, buf.str(), __FILE__, __LINE__ );
return false;
}
}
//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_replication_func( l7vs::l7vsadm_request::COMMAND_CODE_TAG cmd, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_replication_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 16, "l7vsadm::parse_replication_func", __FILE__, __LINE__ );
request.command = cmd;
for( int pos = 2; pos < argc; ++pos ){
std::stringstream buf;
buf << "replication option not found:" << argv[pos];
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 59, buf.str(), __FILE__, __LINE__ );
return false;
}
}
// not specified replication command
std::string buf("replication command not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 60, buf, __FILE__, __LINE__ );
return false;
}
return true;
//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_opt_replication_switch_func( int& pos, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_opt_replication_switch_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 17, "l7vsadm::parse_opt_replication_switch_func", __FILE__, __LINE__ );
if( request.replication_command != l7vsadm_request::REP_NONE ){
// double command target.
std::string buf("replication option is double specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 61, buf, __FILE__, __LINE__ );
return false;
}
if( ++pos >= argc ){
// don't target replication switch value
std::string buf("replication switch option is not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 62, buf, __FILE__, __LINE__ );
return false;
}
parse_opt_map_type::iterator itr = replication_switch_option_dic.find( argv[pos] );
std::stringstream buf;
buf << "replication switch option not found:" << argv[pos];
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 63, buf.str(), __FILE__, __LINE__ );
return false;
}
return true;
//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_opt_replication_start_func( int& pos, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_opt_replication_start_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 18, "l7vsadm::parse_opt_replication_start_func", __FILE__, __LINE__ );
request.replication_command = l7vsadm_request::REP_START;
return true;
//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_opt_replication_stop_func( int& pos, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_opt_replication_stop_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 19, "l7vsadm::parse_opt_replication_stop_func", __FILE__, __LINE__ );
request.replication_command = l7vsadm_request::REP_STOP;
return true;
//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_opt_replication_force_func( int& pos, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_opt_replication_force_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 20, "l7vsadm::parse_opt_replication_force_func", __FILE__, __LINE__ );
if( request.replication_command != l7vsadm_request::REP_NONE ){
// double command target.
std::string buf("replication option is double specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 64, buf, __FILE__, __LINE__ );
return false;
}
request.replication_command = l7vsadm_request::REP_FORCE;
//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_opt_replication_dump_func( int& pos, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_opt_replication_dump_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 21, "l7vsadm::parse_opt_replication_dump_func", __FILE__, __LINE__ );
if( request.replication_command != l7vsadm_request::REP_NONE ){
// double command target.
std::string buf("replication option is double specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 65, buf, __FILE__, __LINE__ );
return false;
}
request.replication_command = l7vsadm_request::REP_DUMP;
//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_log_func( l7vs::l7vsadm_request::COMMAND_CODE_TAG cmd, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_log_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 22, "l7vsadm::parse_log_func", __FILE__, __LINE__ );
request.command = cmd;
for( int pos = 2; pos < argc; ++pos ){
std::stringstream buf;
buf << "log option not found:" << argv[pos];
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 66, buf.str(), __FILE__, __LINE__ );
return false;
}
}
// not specified logcategory
std::string buf("logcategory not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 67, buf, __FILE__, __LINE__ );
return false;
}
if( LOG_LV_NONE == request.log_level ){
// not specified loglevel
std::string buf("loglevel not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 68, buf, __FILE__, __LINE__ );
return false;
}
return true;
//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_opt_log_category_func( int& pos, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_opt_log_category_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 23, "l7vsadm::parse_opt_log_category_func", __FILE__, __LINE__ );
if( request.log_category != LOG_CAT_NONE ){
// double target commands.
std::string buf("logcategory is double specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 69, buf, __FILE__, __LINE__ );
return false;
}
if( ++pos >= argc ){
// don't target logcategory
std::string buf("logcategory is not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 70, buf, __FILE__, __LINE__ );
return false;
}
string_logcategory_map_type::iterator itr = string_logcategory_dic.find( argv[pos] );
std::stringstream buf;
buf << "logcategory not found:" << argv[pos];
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 71, buf.str(), __FILE__, __LINE__ );
return false;
}
//! log level set function
//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_opt_log_level_func( int& pos, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_opt_log_level_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 24, "l7vsadm::parse_opt_log_level_func", __FILE__, __LINE__ );
if( request.log_level != LOG_LV_NONE ){
// double target commands.
std::string buf("loglevel is double specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 72, buf, __FILE__, __LINE__ );
return false;
}
if( ++pos >= argc ){
// don't target loglevel
std::string buf("loglevel is not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 73, buf, __FILE__, __LINE__ );
return false;
}
string_loglevel_map_type::iterator itr = string_loglevel_dic.find( argv[pos] );
std::stringstream buf;
buf << "loglevel not found:" << argv[pos];
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 74, buf.str(), __FILE__, __LINE__ );
return false;
}
//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_snmp_func( l7vs::l7vsadm_request::COMMAND_CODE_TAG cmd, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_snmp_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 25, "l7vsadm::parse_snmp_func", __FILE__, __LINE__ );
request.command = cmd;
for( int pos = 2; pos < argc; ++pos ){
std::stringstream buf;
buf << "snmp log option not found:" << argv[pos];
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 75, buf.str(), __FILE__, __LINE__ );
return false;
}
}
// not specified logcategory
std::string buf("snmp logcategory not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 76, buf, __FILE__, __LINE__ );
return false;
}
if( LOG_LV_NONE == request.snmp_log_level ){
// not specified loglevel
std::string buf("snmp loglevel not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 77, buf, __FILE__, __LINE__ );
return false;
}
return true;
//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_opt_snmp_log_category_func( int& pos, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_opt_snmp_log_category_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 26, "l7vsadm::parse_opt_snmp_log_category_func", __FILE__, __LINE__ );
if( request.snmp_log_category != LOG_CAT_NONE ){
// double target commands.
std::string buf("snmp logcategory is double specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 78, buf, __FILE__, __LINE__ );
return false;
}
if( ++pos >= argc ){
// don't target logcategory
std::string buf("snmp logcategory is not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 79, buf, __FILE__, __LINE__ );
return false;
}
string_logcategory_map_type::iterator itr = string_snmp_logcategory_dic.find( argv[pos] );
std::stringstream buf;
buf << "snmp logcategory not found:" << argv[pos];
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 80, buf.str(), __FILE__, __LINE__ );
return false;
}
//! snmp log level set function
//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_opt_snmp_log_level_func( int& pos, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_opt_snmp_log_level_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 27, "l7vsadm::parse_opt_snmp_log_level_func", __FILE__, __LINE__ );
if( request.snmp_log_level != LOG_LV_NONE ){
// double target commands.
std::string buf("snmp loglevel is double specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 81, buf, __FILE__, __LINE__ );
return false;
}
if( ++pos >= argc ){
// don't rarget logcategory
std::string buf("snmp loglevel is not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 82, buf, __FILE__, __LINE__ );
return false;
}
string_loglevel_map_type::iterator itr = string_loglevel_dic.find( argv[pos] );
std::stringstream buf;
buf << "snmp loglevel not found:" << argv[pos];
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 83, buf.str(), __FILE__, __LINE__ );
return false;
}
//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_parameter_func( l7vs::l7vsadm_request::COMMAND_CODE_TAG cmd, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_parameter_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 28, "l7vsadm::parse_parameter_func", __FILE__, __LINE__ );
request.command = cmd;
for( int pos = 2; pos < argc; ++pos ){
std::stringstream buf;
buf << "parameter option not found:" << argv[pos];
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 84, buf.str(), __FILE__, __LINE__ );
return false;
}
}
// not specified reload_param
std::string buf("reload component not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 85, buf, __FILE__, __LINE__ );
return false;
}
return true;
//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_opt_parameter_reload_func( int& pos, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_opt_parameter_reload_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 29, "l7vsadm::parse_opt_parameter_reload_func", __FILE__, __LINE__ );
if( ++pos >= argc ){
// don't target reload component
std::string buf("reload component is not specified.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 86, buf, __FILE__, __LINE__ );
return false;
}
string_parameter_map_type::iterator itr = string_parameter_dic.find( argv[pos] );
std::stringstream buf;
buf << "reload component not found:" << argv[pos];
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 87, buf.str(), __FILE__, __LINE__ );
return false;
}
//! @param[in] argument count
//! @param[in] argument value
bool l7vs::l7vsadm::parse_help_func( l7vs::l7vsadm_request::COMMAND_CODE_TAG cmd, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::parse_help_func", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 30, "l7vsadm::parse_help_func", __FILE__, __LINE__ );
request.command = cmd;
//! usage function.
std::string l7vs::l7vsadm::usage(){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::usage", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 31, "l7vsadm::usage", __FILE__, __LINE__ );
std::stringstream stream;
stream <<
//! disp_list function
void l7vs::l7vsadm::disp_list(){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::disp_list", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 32, "l7vsadm::disp_list", __FILE__, __LINE__ );
std::stringstream buf;
buf << boost::format( "Layer-7 Virtual Server version %s\n" ) % VERSION;
//! disp_list_key function
void l7vs::l7vsadm::disp_list_key(){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::disp_list_key", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 33, "l7vsadm::disp_list_key", __FILE__, __LINE__ );
std::stringstream buf;
buf << boost::format( "Layer-7 Virtual Server version %s\n" ) % VERSION;
//! disp_list_verbose function
void l7vs::l7vsadm::disp_list_verbose(){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::disp_list_verbose", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 34, "l7vsadm::disp_list_verbose", __FILE__, __LINE__ );
std::stringstream buf;
buf << boost::format( "Layer-7 Virtual Server version %s\n" ) % VERSION;
command_wait_count( L7VSADM_DEFAULT_WAIT_COUNT ),
connect_wait_interval( L7VSADM_DEFAULT_WAIT_INTERVAL ),
connect_wait_count( L7VSADM_DEFAULT_WAIT_COUNT ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::l7vsadm(constructor)", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 35, "l7vsadm::l7vsadm(constructor)", __FILE__, __LINE__ );
// create command dictionary.
command_dic["-l"] = boost::bind( &l7vsadm::parse_list_func, this, l7vsadm_request::CMD_LIST, _1, _2 );
//! Get l7vsadm parameter data
void l7vs::l7vsadm::set_parameter(){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::set_parameter", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 36, "l7vsadm::set_parameter", __FILE__, __LINE__ );
// Get and Set l7vsadm all parameter value.
Parameter param;
}
else{
std::string msg("Get cmd_interval parameter error. Use default value.");
- Logger::putLogWarn(LOG_CAT_L7VSADM_COMMON, 1, msg, __FILE__, __LINE__);
+ Logger::putLogWarn(LOG_CAT_L7VSADM_COMMON, 2, msg, __FILE__, __LINE__);
}
//command_wait_count
// When illegal parameter value, use default parameter value.
command_wait_count = L7VSADM_DEFAULT_WAIT_COUNT;
std::string msg("Illegal cmd_count parameter value. Use default value.");
- Logger::putLogWarn(LOG_CAT_L7VSADM_COMMON, 1, msg, __FILE__, __LINE__);
+ Logger::putLogWarn(LOG_CAT_L7VSADM_COMMON, 3, msg, __FILE__, __LINE__);
}
}
else{
std::string msg("Get cmd_count parameter error. Use default value.");
- Logger::putLogWarn(LOG_CAT_L7VSADM_COMMON, 1, msg, __FILE__, __LINE__);
+ Logger::putLogWarn(LOG_CAT_L7VSADM_COMMON, 4, msg, __FILE__, __LINE__);
}
// connect_wait_interval
// When illegal parameter value, use default parameter value.
connect_wait_interval = L7VSADM_DEFAULT_WAIT_INTERVAL;
std::string msg("Illegal con_interval parameter value. Use default value.");
- Logger::putLogWarn(LOG_CAT_L7VSADM_COMMON, 1, msg, __FILE__, __LINE__);
+ Logger::putLogWarn(LOG_CAT_L7VSADM_COMMON, 5, msg, __FILE__, __LINE__);
}
}
else{
std::string msg("Get con_interval parameter error. Use default value.");
- Logger::putLogWarn(LOG_CAT_L7VSADM_COMMON, 1, msg, __FILE__, __LINE__);
+ Logger::putLogWarn(LOG_CAT_L7VSADM_COMMON, 6, msg, __FILE__, __LINE__);
}
//connect_wait_count
// When illegal parameter value, use default parameter value.
connect_wait_count = L7VSADM_DEFAULT_WAIT_COUNT;
std::string msg("Illegal con_count parameter value. Use default value.");
- Logger::putLogWarn(LOG_CAT_L7VSADM_COMMON, 1, msg, __FILE__, __LINE__);
+ Logger::putLogWarn(LOG_CAT_L7VSADM_COMMON, 7, msg, __FILE__, __LINE__);
}
}
else{
std::string msg("Get con_count parameter error. Use default value.");
- Logger::putLogWarn(LOG_CAT_L7VSADM_COMMON, 1, msg, __FILE__, __LINE__);
+ Logger::putLogWarn(LOG_CAT_L7VSADM_COMMON, 8, msg, __FILE__, __LINE__);
}
if ((command_wait_interval * command_wait_count) > L7VSADM_MAX_WAIT) {
command_wait_interval = L7VSADM_DEFAULT_WAIT_INTERVAL;
command_wait_count = L7VSADM_DEFAULT_WAIT_COUNT;
std::string msg("Command wait value too long. Use default value.");
- Logger::putLogWarn(LOG_CAT_L7VSADM_COMMON, 1, msg, __FILE__, __LINE__);
+ Logger::putLogWarn(LOG_CAT_L7VSADM_COMMON, 9, msg, __FILE__, __LINE__);
}
if ((connect_wait_interval * connect_wait_count) > L7VSADM_MAX_WAIT) {
connect_wait_interval = L7VSADM_DEFAULT_WAIT_INTERVAL;
connect_wait_count = L7VSADM_DEFAULT_WAIT_COUNT;
std::string msg("Connect wait value too long. Use default value.");
- Logger::putLogWarn(LOG_CAT_L7VSADM_COMMON, 1, msg, __FILE__, __LINE__);
+ Logger::putLogWarn(LOG_CAT_L7VSADM_COMMON, 10, msg, __FILE__, __LINE__);
}
}
//! l7vsadm command execute
bool l7vs::l7vsadm::execute( int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSADM_COMMON, 1, "l7vsadm::execute", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSADM_COMMON, 37, "l7vsadm::execute", __FILE__, __LINE__ );
/*-------- DEBUG LOG --------*/
if( LOG_LV_DEBUG == Logger::getLogLevel( LOG_CAT_L7VSADM_COMMON ) ){
std::stringstream debugstr;
debugstr << boost::format( "l7vsadm::execute arguments:%s" ) % argument_debug_dump( argc, argv );
- Logger::putLogDebug( LOG_CAT_L7VSADM_COMMON, 1, debugstr.str(), __FILE__, __LINE__ );
+ Logger::putLogDebug( LOG_CAT_L7VSADM_COMMON, 38, debugstr.str(), __FILE__, __LINE__ );
}
/*------ DEBUG LOG END ------*/
file_lock lock( l7vsadm_file_path, l7vsadm_err );
if( l7vsadm_err ){
std::cerr << "COMMON ERROR : " << l7vsadm_err.get_message() << std::endl;
- Logger::putLogError( LOG_CAT_L7VSADM_COMMON, 1, l7vsadm_err.get_message(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_COMMON, 2, l7vsadm_err.get_message(), __FILE__, __LINE__ );
return false;
}
std::stringstream buf;
buf << boost::format( "Signal (%d) Received." ) % received_sig;
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_COMMON, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_COMMON, 3, buf.str(), __FILE__, __LINE__ );
break;
}
// L7vsadm file lock error. (l7vsadm is executing)
std::string buf( "L7vsadm file lock timeout. (l7vsadm is already executing)" );
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_COMMON, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_COMMON, 4, buf, __FILE__, __LINE__ );
break;
}
// Lock retrying.
else{
std::string buf("command not found.");
l7vsadm_err.setter( true, buf );
- Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 1, buf, __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_PARSE, 88, buf, __FILE__, __LINE__ );
}
}
std::stringstream buf;
buf << boost::format( "Signal (%d) Received." ) % received_sig;
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_COMMON, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_COMMON, 5, buf.str(), __FILE__, __LINE__ );
break;
}
std::stringstream buf;
buf << boost::format( "connect() to daemon timeout: %s." ) % err.message();
l7vsadm_err.setter( true, buf.str() );
- Logger::putLogError( LOG_CAT_L7VSADM_COMMON, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_COMMON, 6, buf.str(), __FILE__, __LINE__ );
break;
}
// Connect retrying.
if( LOG_LV_DEBUG == Logger::getLogLevel( LOG_CAT_L7VSADM_COMMON ) ){
std::stringstream debugstr;
debugstr << boost::format( "l7vsadm_send_request:%s" ) % request;
- Logger::putLogDebug( LOG_CAT_L7VSADM_COMMON, 1, debugstr.str(), __FILE__, __LINE__ );
+ Logger::putLogDebug( LOG_CAT_L7VSADM_COMMON, 39, debugstr.str(), __FILE__, __LINE__ );
}
/*------ DEBUG LOG END ------*/
if( LOG_LV_DEBUG == Logger::getLogLevel( LOG_CAT_L7VSADM_COMMON ) ){
std::stringstream debugstr;
debugstr << boost::format( "l7vsadm_recv_response:%s" ) % response;
- Logger::putLogDebug( LOG_CAT_L7VSADM_COMMON, 1, debugstr.str(), __FILE__, __LINE__ );
+ Logger::putLogDebug( LOG_CAT_L7VSADM_COMMON, 40, debugstr.str(), __FILE__, __LINE__ );
}
/*------ DEBUG LOG END ------*/
else
buf << "COMMAND ERROR : " << response.message;
std::cerr << buf.str() << std::endl;
- Logger::putLogError( LOG_CAT_L7VSADM_COMMON, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_COMMON, 7, buf.str(), __FILE__, __LINE__ );
return false;
}
} //if help_mode
std::stringstream buf;
buf << "COMMON ERROR : " << e.what();
std::cerr << buf.str() << std::endl;
- Logger::putLogError( LOG_CAT_L7VSADM_COMMON, 1, buf.str(), __FILE__, __LINE__ );
+ Logger::putLogError( LOG_CAT_L7VSADM_COMMON, 8, buf.str(), __FILE__, __LINE__ );
return false;
}
return true;
//! destructor
l7vsd::~l7vsd(){
- Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 1, "l7vsd::~l7vsd", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 2, "l7vsd::~l7vsd", __FILE__, __LINE__ );
}
//! virtual_service list command
//! @param[out] arry of vs_element
//! @param[out] error_code
void l7vsd::list_virtual_service( vselist_type* out_vslist, error_code& err ){
- Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 1, "l7vsd::list_virtual_service", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 3, "l7vsd::list_virtual_service", __FILE__, __LINE__ );
boost::mutex::scoped_lock command_lock( command_mutex );
boost::mutex::scoped_lock vslist_lock( vslist_mutex );
debugstr << ": ";
++i;
}
- Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 1, debugstr.str(), __FILE__, __LINE__ );
+ Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 4, debugstr.str(), __FILE__, __LINE__ );
}
/*------ DEBUG LOG END ------*/
//! @param[out] arry of vs_element
//! @param[out] error_code
void l7vsd::list_virtual_service_verbose( l7vsd_response* response, error_code& err ){
- Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 1, "l7vsd::list_virtual_service_verbose", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 5, "l7vsd::list_virtual_service_verbose", __FILE__, __LINE__ );
boost::mutex::scoped_lock command_lock( command_mutex );
boost::mutex::scoped_lock vslist_lock( vslist_mutex );
if( !response ){
std::string msg("response pointer is null.");
- Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 1, msg, __FILE__, __LINE__);
+ Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 2, msg, __FILE__, __LINE__);
err.setter( true, msg );
return;
}
if( !bridge ){
std::string msg("bridge pointer is null.");
- Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 1, msg, __FILE__, __LINE__);
+ Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 3, msg, __FILE__, __LINE__);
err.setter( true, msg );
return;
}
if( !rep ){
std::string msg("rep pointer is null.");
- Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 1, msg, __FILE__, __LINE__);
+ Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 4, msg, __FILE__, __LINE__);
err.setter( true, msg );
return;
}
if( LOG_LV_DEBUG == Logger::getLogLevel( LOG_CAT_L7VSD_MAINTHREAD ) ){
std::stringstream debugstr;
debugstr << boost::format( "l7vsd::list_virtual_service_verbose return value:%s" ) % *response;
- Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 1, debugstr.str(), __FILE__, __LINE__ );
+ Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 6, debugstr.str(), __FILE__, __LINE__ );
}
/*------ DEBUG LOG END ------*/
//! @param[in] vs_element
//! @param[out] error_code
void l7vsd::add_virtual_service( const virtualservice_element* in_vselement, error_code& err ){
- Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 1, "l7vsd::add_virtual_service", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 7, "l7vsd::add_virtual_service", __FILE__, __LINE__ );
boost::mutex::scoped_lock command_lock( command_mutex );
boost::mutex::scoped_lock vslist_lock( vslist_mutex );
if( !in_vselement ){
std::string msg("in_vselement pointer is null.");
- Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 1, msg, __FILE__, __LINE__);
+ Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 5, msg, __FILE__, __LINE__);
err.setter( true, msg );
return;
}
std::stringstream debugstr;
debugstr << "l7vsd::add_virtual_service arguments:";
debugstr << boost::format( "*in_vselement=%s" ) % *in_vselement;
- Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 1, debugstr.str(), __FILE__, __LINE__ );
+ Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 8, debugstr.str(), __FILE__, __LINE__ );
}
/*------ DEBUG LOG END ------*/
// replication null check
if( NULL == rep ){
std::string msg("replication pointer is null.");
- Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 1, msg, __FILE__, __LINE__);
+ Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 6, msg, __FILE__, __LINE__);
err.setter( true, msg );
return;
}
if( NULL == vsptr ){
std::string msg("virtualservice pointer is null.");
- Logger::putLogError(LOG_CAT_L7VSD_MAINTHREAD, 1, msg, __FILE__, __LINE__);
+ Logger::putLogError(LOG_CAT_L7VSD_MAINTHREAD, 2, msg, __FILE__, __LINE__);
err.setter( true, msg );
return;
}
//! @param[in] vs_element
//! @param[out] error_code
void l7vsd::del_virtual_service( const virtualservice_element* in_vselement, error_code& err ){
- Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 1, "l7vsd::del_virtual_service", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 9, "l7vsd::del_virtual_service", __FILE__, __LINE__ );
boost::mutex::scoped_lock command_lock( command_mutex );
boost::mutex::scoped_lock vslist_lock( vslist_mutex );
if( !in_vselement ){
std::string msg("in_vselement pointer is null.");
- Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 1, msg, __FILE__, __LINE__);
+ Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 7, msg, __FILE__, __LINE__);
err.setter( true, msg );
return;
}
std::stringstream debugstr;
debugstr << "l7vsd::del_virtual_service arguments:";
debugstr << boost::format( "*in_vselement=%s" ) % *in_vselement;
- Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 1, debugstr.str(), __FILE__, __LINE__ );
+ Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 10, debugstr.str(), __FILE__, __LINE__ );
}
/*------ DEBUG LOG END ------*/
//! @param[in] vs_element
//! @param[out] error_code
void l7vsd::edit_virtual_service( const virtualservice_element* in_vselement, error_code& err ){
- Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 1, "l7vsd::edit_virtual_service", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 11, "l7vsd::edit_virtual_service", __FILE__, __LINE__ );
boost::mutex::scoped_lock command_lock( command_mutex );
boost::mutex::scoped_lock vslist_lock( vslist_mutex );
if( !in_vselement ){
std::string msg("in_vselement pointer is null.");
- Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 1, msg, __FILE__, __LINE__);
+ Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 8, msg, __FILE__, __LINE__);
err.setter( true, msg );
return;
}
std::stringstream debugstr;
debugstr << "l7vsd::edit_virtual_service arguments:";
debugstr << boost::format( "*in_vselement=%s" ) % *in_vselement;
- Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 1, debugstr.str(), __FILE__, __LINE__ );
+ Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 12, debugstr.str(), __FILE__, __LINE__ );
}
/*------ DEBUG LOG END ------*/
//! @param[in] vs_element
//! @param[out] error_code
void l7vsd::add_real_server( const virtualservice_element* in_vselement, error_code& err ){
- Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 1, "l7vsd::add_real_server", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 13, "l7vsd::add_real_server", __FILE__, __LINE__ );
boost::mutex::scoped_lock command_lock( command_mutex );
boost::mutex::scoped_lock vslist_lock( vslist_mutex );
if( !in_vselement ){
std::string msg("in_vselement pointer is null.");
- Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 1, msg, __FILE__, __LINE__);
+ Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 9, msg, __FILE__, __LINE__);
err.setter( true, msg );
return;
}
std::stringstream debugstr;
debugstr << "l7vsd::add_real_server arguments:";
debugstr << boost::format( "*in_vselement=%s" ) % *in_vselement;
- Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 1, debugstr.str(), __FILE__, __LINE__ );
+ Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 14, debugstr.str(), __FILE__, __LINE__ );
}
/*------ DEBUG LOG END ------*/
//! @param[in] vs_element
//! @param[out] error_code
void l7vsd::del_real_server( const virtualservice_element* in_vselement, error_code& err ){
- Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 1, "l7vsd::del_real_server", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 15, "l7vsd::del_real_server", __FILE__, __LINE__ );
boost::mutex::scoped_lock command_lock( command_mutex );
boost::mutex::scoped_lock vslist_lock( vslist_mutex );
if( !in_vselement ){
std::string msg("in_vselement pointer is null.");
- Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 1, msg, __FILE__, __LINE__);
+ Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 10, msg, __FILE__, __LINE__);
err.setter( true, msg );
return;
}
std::stringstream debugstr;
debugstr << "l7vsd::del_real_server arguments:";
debugstr << boost::format( "*in_vselement=%s" ) % *in_vselement;
- Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 1, debugstr.str(), __FILE__, __LINE__ );
+ Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 16, debugstr.str(), __FILE__, __LINE__ );
}
/*------ DEBUG LOG END ------*/
//! @param[in] vs_element
//! @param[out] error_code
void l7vsd::edit_real_server( const virtualservice_element* in_vselement, error_code& err ){
- Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 1, "l7vsd::edit_real_server", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 17, "l7vsd::edit_real_server", __FILE__, __LINE__ );
boost::mutex::scoped_lock command_lock( command_mutex );
boost::mutex::scoped_lock vslist_lock( vslist_mutex );
if( !in_vselement ){
std::string msg("in_vselement pointer is null.");
- Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 1, msg, __FILE__, __LINE__);
+ Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 11, msg, __FILE__, __LINE__);
err.setter( true, msg );
return;
}
std::stringstream debugstr;
debugstr << "l7vsd::edit_real_server arguments:";
debugstr << boost::format( "*in_vselement=%s" ) % *in_vselement;
- Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 1, debugstr.str(), __FILE__, __LINE__ );
+ Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 18, debugstr.str(), __FILE__, __LINE__ );
}
/*------ DEBUG LOG END ------*/
//! virtual_service flush command
//! @param[out] error_code
void l7vsd::flush_virtual_service( error_code& err ){
- Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 1, "l7vsd::flush_virtual_service", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 19, "l7vsd::flush_virtual_service", __FILE__, __LINE__ );
boost::mutex::scoped_lock command_lock( command_mutex );
boost::mutex::scoped_lock vslist_lock( vslist_mutex );
//! @param[in] replicaiton command
//! @param[out] error_code
void l7vsd::replication_command( const l7vsadm_request::REPLICATION_COMMAND_TAG* cmd, error_code& err ){
- Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 1, "l7vsd::replication_command", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 20, "l7vsd::replication_command", __FILE__, __LINE__ );
boost::mutex::scoped_lock command_lock( command_mutex );
boost::mutex::scoped_lock vslist_lock( vslist_mutex );
if( !cmd ){
std::string msg("cmd pointer is null.");
- Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 1, msg, __FILE__, __LINE__);
+ Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 12, msg, __FILE__, __LINE__);
err.setter( true, msg );
return;
}
if( !rep ){
std::string msg("rep pointer is null.");
- Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 1, msg, __FILE__, __LINE__);
+ Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 13, msg, __FILE__, __LINE__);
err.setter( true, msg );
return;
}
std::stringstream debugstr;
debugstr << "l7vsd::replication_command arguments:";
debugstr << boost::format( "*cmd=%d" ) % *cmd;
- Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 1, debugstr.str(), __FILE__, __LINE__ );
+ Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 21, debugstr.str(), __FILE__, __LINE__ );
}
/*------ DEBUG LOG END ------*/
break;
default:
std::string msg("invalid replication command.");
- Logger::putLogError(LOG_CAT_L7VSD_REPLICATION, 1, msg, __FILE__, __LINE__);
+ Logger::putLogError(LOG_CAT_L7VSD_REPLICATION, 38, msg, __FILE__, __LINE__);
err.setter( true, msg );
return;
}
//! @param[in] log level
//! @param[out] error_code
void l7vsd::set_loglevel( const LOG_CATEGORY_TAG* cat, const LOG_LEVEL_TAG* level, error_code& err ){
- Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 1, "l7vsd::set_loglevel", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 22, "l7vsd::set_loglevel", __FILE__, __LINE__ );
boost::mutex::scoped_lock command_lock( command_mutex );
boost::mutex::scoped_lock vslist_lock( vslist_mutex );
if( !cat ){
std::string msg("cat pointer is null.");
- Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 1, msg, __FILE__, __LINE__);
+ Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 14, msg, __FILE__, __LINE__);
err.setter( true, msg );
return;
}
if( !level ){
std::string msg("level pointer is null.");
- Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 1, msg, __FILE__, __LINE__);
+ Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 15, msg, __FILE__, __LINE__);
err.setter( true, msg );
return;
}
std::stringstream debugstr;
debugstr << "l7vsd::set_loglevel arguments:";
debugstr << boost::format( "*cat=%d, level=%d" ) % *cat % *level;
- Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 1, debugstr.str(), __FILE__, __LINE__ );
+ Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 23, debugstr.str(), __FILE__, __LINE__ );
}
/*------ DEBUG LOG END ------*/
// set loglevel all
if( !Logger::setLogLevelAll( *level ) ){
std::string msg("set loglevel all failed.");
- Logger::putLogError(LOG_CAT_L7VSD_LOGGER, 1, msg, __FILE__, __LINE__);
+ Logger::putLogError(LOG_CAT_L7VSD_LOGGER, 50, msg, __FILE__, __LINE__);
err.setter( true, msg );
return;
}
else{
if( !Logger::setLogLevel( *cat, *level ) ){
std::string msg("set loglevel failed.");
- Logger::putLogError(LOG_CAT_L7VSD_LOGGER, 1, msg, __FILE__, __LINE__);
+ Logger::putLogError(LOG_CAT_L7VSD_LOGGER, 51, msg, __FILE__, __LINE__);
err.setter( true, msg );
return;
}
//! @param[in] log level
//! @param[out] error_code
void l7vsd::snmp_set_loglevel( const LOG_CATEGORY_TAG* cat, const LOG_LEVEL_TAG* level, error_code& err ){
- Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 1, "l7vsd::snmp_set_loglevel", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 24, "l7vsd::snmp_set_loglevel", __FILE__, __LINE__ );
boost::mutex::scoped_lock command_lock( command_mutex );
boost::mutex::scoped_lock vslist_lock( vslist_mutex );
if( !cat ){
std::string msg("cat pointer is null.");
- Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 1, msg, __FILE__, __LINE__);
+ Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 16, msg, __FILE__, __LINE__);
err.setter( true, msg );
return;
}
if( !level ){
std::string msg("level pointer is null.");
- Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 1, msg, __FILE__, __LINE__);
+ Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 17, msg, __FILE__, __LINE__);
err.setter( true, msg );
return;
}
if( !bridge ){
std::string msg("bridge pointer is null.");
- Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 1, msg, __FILE__, __LINE__);
+ Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 18, msg, __FILE__, __LINE__);
err.setter( true, msg );
return;
}
std::stringstream debugstr;
debugstr << "l7vsd::snmp_set_loglevel arguments:";
debugstr << boost::format( "*cat=%d, level=%d" ) % *cat % *level;
- Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 1, debugstr.str(), __FILE__, __LINE__ );
+ Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 25, debugstr.str(), __FILE__, __LINE__ );
}
/*------ DEBUG LOG END ------*/
// set loglevel all
if( 0 != bridge->change_loglevel_allcategory( *level ) ){
std::string msg("set snmp loglevel all failed.");
- Logger::putLogError(LOG_CAT_L7VSD_LOGGER, 1, msg, __FILE__, __LINE__);
+ Logger::putLogError(LOG_CAT_L7VSD_LOGGER, 52, msg, __FILE__, __LINE__);
err.setter( true, msg );
return;
}
else{
if( 0 != bridge->change_loglevel( *cat, *level ) ){
std::string msg("set snmp loglevel failed.");
- Logger::putLogError(LOG_CAT_L7VSD_LOGGER, 1, msg, __FILE__, __LINE__);
+ Logger::putLogError(LOG_CAT_L7VSD_LOGGER, 53, msg, __FILE__, __LINE__);
err.setter( true, msg );
return;
}
//! @param[in] reload component
//! @param[out] error_code
void l7vsd::reload_parameter( const PARAMETER_COMPONENT_TAG* comp, error_code& err ){
- Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 1, "l7vsd::reload_parameter", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 26, "l7vsd::reload_parameter", __FILE__, __LINE__ );
boost::mutex::scoped_lock command_lock( command_mutex );
boost::mutex::scoped_lock vslist_lock( vslist_mutex );
if( !comp ){
std::string msg("comp pointer is null.");
- Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 1, msg, __FILE__, __LINE__);
+ Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 19, msg, __FILE__, __LINE__);
err.setter( true, msg );
return;
}
if( !rep ){
std::string msg("rep pointer is null.");
- Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 1, msg, __FILE__, __LINE__);
+ Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 20, msg, __FILE__, __LINE__);
err.setter( true, msg );
return;
}
if( !bridge ){
std::string msg("bridge pointer is null.");
- Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 1, msg, __FILE__, __LINE__);
+ Logger::putLogFatal(LOG_CAT_L7VSD_MAINTHREAD, 21, msg, __FILE__, __LINE__);
err.setter( true, msg );
return;
}
std::stringstream debugstr;
debugstr << "l7vsd::reload_parameter arguments:";
debugstr << boost::format( "*comp=%d" ) % *comp;
- Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 1, debugstr.str(), __FILE__, __LINE__ );
+ Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 27, debugstr.str(), __FILE__, __LINE__ );
}
/*------ DEBUG LOG END ------*/
}
else{
std::string msg("parameter reload failed.");
- Logger::putLogError(LOG_CAT_L7VSD_PARAMETER, 1, msg, __FILE__, __LINE__);
+ Logger::putLogError(LOG_CAT_L7VSD_PARAMETER, 7, msg, __FILE__, __LINE__);
err.setter( true, msg );
return;
}
//! @param[in] vs_element
//! @param[out] error_code
l7vsd::vslist_type::iterator l7vsd::search_vslist( const virtualservice_element& in_vselement ) const {
- Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 1, "l7vsd::search_vslist", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 28, "l7vsd::search_vslist", __FILE__, __LINE__ );
/*-------- DEBUG LOG --------*/
if( LOG_LV_DEBUG == Logger::getLogLevel( LOG_CAT_L7VSD_MAINTHREAD ) ){
std::stringstream debugstr;
debugstr << "l7vsd::search_vslist arguments:";
debugstr << boost::format( "in_vselement=%s" ) % in_vselement;
- Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 1, debugstr.str(), __FILE__, __LINE__ );
+ Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 29, debugstr.str(), __FILE__, __LINE__ );
}
/*------ DEBUG LOG END ------*/
//! virtualservice release from vslist
//! @param[in] vs_element
void l7vsd::release_virtual_service( const virtualservice_element& in_vselement ) const {
- Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 1, "l7vsd::release_virtual_service", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 30, "l7vsd::release_virtual_service", __FILE__, __LINE__ );
/*-------- DEBUG LOG --------*/
if( LOG_LV_DEBUG == Logger::getLogLevel( LOG_CAT_L7VSD_MAINTHREAD ) ){
std::stringstream debugstr;
debugstr << "l7vsd::release_virtual_service arguments:";
debugstr << boost::format( "in_vselement=%s" ) % in_vselement;
- Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 1, debugstr.str(), __FILE__, __LINE__ );
+ Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 31, debugstr.str(), __FILE__, __LINE__ );
}
/*------ DEBUG LOG END ------*/
//! virtualservice_list getter
//! @return vslist
l7vsd::vslist_type& l7vsd::get_virtualservice_list(){
- Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 1, "l7vsd::get_virtualservice_list", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 32, "l7vsd::get_virtualservice_list", __FILE__, __LINE__ );
return vslist;
}
//! virtualservice_list mutex getter
//! @return vslist_mutex
boost::mutex& l7vsd::get_virtualservice_list_mutex(){
- Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 1, "l7vsd::get_virtualservice_list_mutex", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 33, "l7vsd::get_virtualservice_list_mutex", __FILE__, __LINE__ );
return vslist_mutex;
}
//! @param[in] argument count
//! @param[in] argument value
int l7vsd::run( int argc, char* argv[] ) {
- Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 1, "l7vsd::run", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 34, "l7vsd::run", __FILE__, __LINE__ );
/*-------- DEBUG LOG --------*/
if( LOG_LV_DEBUG == Logger::getLogLevel( LOG_CAT_L7VSADM_COMMON ) ){
std::stringstream debugstr;
debugstr << boost::format( "l7vsd::run arguments:%s" ) % argument_debug_dump( argc, argv );
- Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 1, debugstr.str(), __FILE__, __LINE__ );
+ Logger::putLogDebug( LOG_CAT_L7VSD_MAINTHREAD, 35, debugstr.str(), __FILE__, __LINE__ );
}
/*------ DEBUG LOG END ------*/
if( 0 > ret ){
std::stringstream buf;
buf << "daemon() failed: " << strerror( errno );
- logger.putLogError( LOG_CAT_L7VSD_MAINTHREAD, 1, buf.str(), __FILE__, __LINE__ );
+ logger.putLogError( LOG_CAT_L7VSD_MAINTHREAD, 3, buf.str(), __FILE__, __LINE__ );
munlockall();
return -1;
}
if( 0 != ret ){
std::stringstream buf;
buf << "setrlimit failed:" << errno;
- logger.putLogWarn( LOG_CAT_L7VSD_MAINTHREAD, 1, buf.str(), __FILE__, __LINE__ );
+ logger.putLogWarn( LOG_CAT_L7VSD_MAINTHREAD, 2, buf.str(), __FILE__, __LINE__ );
}
// signal handler thread start
// receiver initialize
receiver.reset( new command_receiver( dispatcher, L7VS_CONFIG_SOCKNAME, *this ) );
if( NULL == receiver ){
- logger.putLogError( LOG_CAT_L7VSD_MAINTHREAD, 1, "command receiver pointer null.", __FILE__, __LINE__ );
+ logger.putLogError( LOG_CAT_L7VSD_MAINTHREAD, 4, "command receiver pointer null.", __FILE__, __LINE__ );
munlockall();
return -1;
}
// replication initialize
rep.reset( new replication() );
if( NULL == rep ){
- logger.putLogError( LOG_CAT_L7VSD_MAINTHREAD, 1, "replication pointer null.", __FILE__, __LINE__ );
+ logger.putLogError( LOG_CAT_L7VSD_MAINTHREAD, 5, "replication pointer null.", __FILE__, __LINE__ );
munlockall();
return -1;
}
if( 0 > rep->initialize() ){
- logger.putLogWarn( LOG_CAT_L7VSD_MAINTHREAD, 1, "replication initialize failed.", __FILE__, __LINE__ );
+ logger.putLogWarn( LOG_CAT_L7VSD_MAINTHREAD, 3, "replication initialize failed.", __FILE__, __LINE__ );
}
// snmp bridge initialize
bridge.reset( new snmpbridge( *this, dispatcher ) );
if( NULL == bridge ){
- logger.putLogFatal( LOG_CAT_L7VSD_MAINTHREAD, 1, "snmpbridge pointer null.", __FILE__, __LINE__ );
+ logger.putLogFatal( LOG_CAT_L7VSD_MAINTHREAD, 22, "snmpbridge pointer null.", __FILE__, __LINE__ );
munlockall();
return -1;
}
if( 0 > bridge->initialize() ){
- logger.putLogError( LOG_CAT_L7VSD_MAINTHREAD, 1, "snmpbridge initialize failed.", __FILE__, __LINE__ );
+ logger.putLogError( LOG_CAT_L7VSD_MAINTHREAD, 6, "snmpbridge initialize failed.", __FILE__, __LINE__ );
munlockall();
return -1;
}
catch( std::exception& e ){
std::stringstream buf;
buf << "l7vsd run error:" << e.what();
- logger.putLogError( LOG_CAT_L7VSD_MAINTHREAD, 1, buf.str(), __FILE__, __LINE__ );
+ logger.putLogError( LOG_CAT_L7VSD_MAINTHREAD, 7, buf.str(), __FILE__, __LINE__ );
munlockall();
return -1;
}
//! @param[in] argument count
//! @param[in] argument value
bool l7vsd::check_options( int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 1, "l7vsd::check_options", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 36, "l7vsd::check_options", __FILE__, __LINE__ );
for( int pos = 1; pos < argc; ++pos ){ // check options.
parse_opt_map_type::iterator itr = option_dic.find( argv[pos] );
//! @param[in] argument count
//! @param[in] argument value
bool l7vsd::parse_help(int& pos, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 1, "l7vsd::parse_help", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 37, "l7vsd::parse_help", __FILE__, __LINE__ );
help = true; //help_mode flag on
return true;
//! @param[in] argument count
//! @param[in] argument value
bool l7vsd::parse_debug(int& pos, int argc, char* argv[] ){
- Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 1, "l7vsd::parse_debug", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 38, "l7vsd::parse_debug", __FILE__, __LINE__ );
debug = true; //debug_mode flag on
return true;
//! create usage string
//! @return usage string
std::string l7vsd::usage(){
- Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 1, "l7vsd::usage", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 39, "l7vsd::usage", __FILE__, __LINE__ );
std::stringstream stream;
stream <<
//! signal handler function
void l7vsd::sig_exit_handler(){
- Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 1, "l7vsd::sig_exit_handler", __FILE__, __LINE__ );
+ Logger logger( LOG_CAT_L7VSD_MAINTHREAD, 40, "l7vsd::sig_exit_handler", __FILE__, __LINE__ );
sigset_t sigmask;
sigemptyset( &sigmask );