From d396c8e058d7665f7bcf85fc79f44030e5269480 Mon Sep 17 00:00:00 2001 From: rakshasa Date: Fri, 25 Apr 2014 19:55:47 +0900 Subject: [PATCH] Changed rpc log types. --- src/command_network.cc | 8 +++++--- src/rpc/scgi_task.cc | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/command_network.cc b/src/command_network.cc index e6cfd081..c445c38c 100644 --- a/src/command_network.cc +++ b/src/command_network.cc @@ -140,7 +140,7 @@ initialize_xmlrpc() { rpc::xmlrpc.insert_command(itr->first, itr->second.m_parm, itr->second.m_doc); } - lt_log_print(torrent::LOG_RPC_INFO, "XMLRPC initialized with %u functions.", count); + lt_log_print(torrent::LOG_RPC_EVENTS, "XMLRPC initialized with %u functions.", count); } torrent::Object @@ -169,7 +169,8 @@ apply_scgi(const std::string& arg, int type) { sa.sa_inet()->clear(); saPtr = &sa; - lt_log_print(torrent::LOG_RPC_WARN, "The SCGI socket has not been bound to any address and likely poses a security risk."); + lt_log_print(torrent::LOG_RPC_EVENTS, + "The SCGI socket has not been bound to any address and likely poses a security risk."); } else if (std::sscanf(arg.c_str(), "%1023[^:]:%i%c", address, &port, &dummy) == 2) { if ((err = rak::address_info::get_address_info(address, PF_INET, SOCK_STREAM, &ai)) != 0) @@ -177,7 +178,8 @@ apply_scgi(const std::string& arg, int type) { saPtr = ai->address(); - lt_log_print(torrent::LOG_RPC_WARN, "The SCGI socket is bound to a specific network device yet may still pose a security risk, consider using 'scgi_local'."); + lt_log_print(torrent::LOG_RPC_EVENTS, + "The SCGI socket is bound to a specific network device yet may still pose a security risk, consider using 'scgi_local'."); } else { throw torrent::input_error("Could not parse address."); diff --git a/src/rpc/scgi_task.cc b/src/rpc/scgi_task.cc index 16a7bb5b..9f2e3290 100644 --- a/src/rpc/scgi_task.cc +++ b/src/rpc/scgi_task.cc @@ -185,7 +185,7 @@ SCgiTask::event_read() { result = write(m_parent->log_fd(), "\n---\n", sizeof("\n---\n")); } - lt_log_print_dump(torrent::LOG_RPC_DEBUG, m_body, m_bufferSize - std::distance(m_buffer, m_body), "scgi", "RPC read.", 0); + lt_log_print_dump(torrent::LOG_RPC_DUMP, m_body, m_bufferSize - std::distance(m_buffer, m_body), "scgi", "RPC read.", 0); // Close if the call failed, else stay open to write back data. if (!m_parent->receive_call(this, m_body, m_bufferSize - std::distance(m_buffer, m_body))) @@ -246,7 +246,7 @@ SCgiTask::receive_write(const char* buffer, uint32_t length) { result = write(m_parent->log_fd(), "\n---\n", sizeof("\n---\n")); } - lt_log_print_dump(torrent::LOG_RPC_DEBUG, m_buffer, m_bufferSize, "scgi", "RPC write.", 0); + lt_log_print_dump(torrent::LOG_RPC_DUMP, m_buffer, m_bufferSize, "scgi", "RPC write.", 0); event_write(); return true;