Skip to content

Commit

Permalink
Move VERBOSITY_NAME(connections) out of utils/logging.h.
Browse files Browse the repository at this point in the history
GitOrigin-RevId: ec768560b9c87ff64d3d8b9a0c821f75abf3321a
  • Loading branch information
levlam committed Aug 17, 2018
1 parent 811cc8f commit 25826e2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
6 changes: 4 additions & 2 deletions td/telegram/net/ConnectionCreator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@

namespace td {

static int VERBOSITY_NAME(connections) = VERBOSITY_NAME(DEBUG) - 2;

namespace detail {

class StatsCallback final : public mtproto::RawConnection::StatsCallback {
Expand Down Expand Up @@ -855,8 +857,8 @@ Result<SocketFd> ConnectionCreator::find_connection(const ProxyInfo &proxy, DcId

if (proxy.use_proxy()) {
extra.mtproto_ip = info.option->get_ip_address();
extra.debug_str = PSTRING() << (proxy.use_socks5_proxy() ? "Socks5 " : "HTTP ") << proxy.ip_address() << " --> "
<< extra.mtproto_ip << extra.debug_str;
extra.debug_str = PSTRING() << (proxy.use_socks5_proxy() ? "Socks5" : (only_http ? "HTTP_ONLY" : "HTTP_TCP")) << ' '
<< proxy.ip_address() << " --> " << extra.mtproto_ip << extra.debug_str;
LOG(INFO) << "Create: " << extra.debug_str;
return SocketFd::open(proxy.ip_address());
} else {
Expand Down
1 change: 0 additions & 1 deletion tdutils/td/utils/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ int VERBOSITY_NAME(td_requests) = VERBOSITY_NAME(INFO);
int VERBOSITY_NAME(dc) = VERBOSITY_NAME(DEBUG) + 2;
int VERBOSITY_NAME(files) = VERBOSITY_NAME(DEBUG) + 2;
int VERBOSITY_NAME(mtproto) = VERBOSITY_NAME(DEBUG) + 7;
int VERBOSITY_NAME(connections) = VERBOSITY_NAME(DEBUG) + 8;
int VERBOSITY_NAME(raw_mtproto) = VERBOSITY_NAME(DEBUG) + 10;
int VERBOSITY_NAME(fd) = VERBOSITY_NAME(DEBUG) + 9;
int VERBOSITY_NAME(actor) = VERBOSITY_NAME(DEBUG) + 10;
Expand Down
1 change: 0 additions & 1 deletion tdutils/td/utils/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ extern int VERBOSITY_NAME(level);
// TODO Not part of utils. Should be in some separate file
extern int VERBOSITY_NAME(mtproto);
extern int VERBOSITY_NAME(raw_mtproto);
extern int VERBOSITY_NAME(connections);
extern int VERBOSITY_NAME(dc);
extern int VERBOSITY_NAME(fd);
extern int VERBOSITY_NAME(net_query);
Expand Down

0 comments on commit 25826e2

Please sign in to comment.