format c++ code style.

This commit is contained in:
zhengshuxin 2019-06-17 10:51:28 +08:00
parent cecaee548e
commit c8e9497086
4 changed files with 328 additions and 309 deletions

File diff suppressed because it is too large Load Diff

View File

@ -33,6 +33,7 @@ private:
void show_commands(void);
bool check(const char* command);
bool parse(acl::string& line, std::vector<acl::string>& out);
void set_addr(const char* in, acl::string& out);
void getline(acl::string& buf, const char* prompt = NULL);
void create_cluster();

View File

@ -56,5 +56,7 @@
//#if defined(_WIN32) || defined(_WIN64)
#include "acl_cpp/lib_acl.hpp"
//#endif
//#define ACL_CPP_DEBUG_MIN 40
//#define ACL_CPP_DEBUG_MAX 70
#define ACL_CPP_DEBUG_MIN 40
#define ACL_CPP_DEBUG_CONN_MANAGER 41
#define ACL_CPP_DEBUG_MAX 70

View File

@ -298,7 +298,8 @@ connect_pool* connect_manager::create_pool(const conn_config& cf, size_t idx)
pool->set_check_inter(check_inter_);
}
logger("Add one service, addr: %s, count: %d",
logger_debug(ACL_CPP_DEBUG_CONN_MANAGER, 1,
"Add one service, addr: %s, count: %d",
cf.addr.c_str(), (int) cf.count);
return pool;
}
@ -337,7 +338,8 @@ connect_pool* connect_manager::get(const char* addr,
if (exclusive) {
lock_.unlock();
}
logger("no connect pool for addr %s", addr);
logger_debug(ACL_CPP_DEBUG_CONN_MANAGER, 1,
"no connect pool for addr %s", addr);
return NULL;
}