Add more thrift log (#605)

This commit is contained in:
Mingyu Chen
2019-01-30 21:28:42 +08:00
committed by ZHAO Chun
parent 08376b0557
commit ca2ab5da59
3 changed files with 17 additions and 3 deletions

View File

@ -31,6 +31,7 @@
#endif
#include <curl/curl.h>
#include <thrift/TOutput.h>
#include "common/logging.h"
#include "common/daemon.h"
@ -64,6 +65,11 @@ extern "C" { void __lsan_do_leak_check(); }
namespace doris {
extern bool k_doris_exit;
static void thrift_output(const char* x) {
LOG(WARNING) << "thrift internal message: " << x;
}
}
int main(int argc, char** argv) {
@ -134,6 +140,8 @@ int main(int argc, char** argv) {
LOG(FATAL) << "fail to initialize libcurl, curl_ret=" << curl_ret;
exit(-1);
}
// add logger for thrift internal
apache::thrift::GlobalOutput.setOutputFunction(doris::thrift_output);
doris::init_daemon(argc, argv, paths);

View File

@ -81,8 +81,14 @@ public class Log4jConfig extends XmlConfiguration {
"<Logger name='audit' level='ERROR' additivity='false'>" +
"<AppenderRef ref='Auditfile'/>" +
"</Logger>" +
"<Logger name='org.apache.thrift.transport' level='DEBUG'>\n" +
" <AppenderRef ref='Sys'/>\n" +
"<Logger name='org.apache.thrift' level='DEBUG'>" +
" <AppenderRef ref='Sys'/>" +
"</Logger>" +
"<Logger name='org.apache.thrift.transport' level='DEBUG'>" +
" <AppenderRef ref='Sys'/>" +
"</Logger>" +
"<Logger name='org.apache.doris.thrift' level='DEBUG'>" +
" <AppenderRef ref='Sys'/>" +
"</Logger>" +
"<!--REPLACED BY AUDIT AND VERBOSE MODULE NAMES-->" +
"</Loggers>" +

View File

@ -375,7 +375,7 @@ public class FrontendServiceImpl implements FrontendService.Iface {
ConnectContext.remove();
}
LOG.debug("mini load result: {}", request);
LOG.debug("mini load result: {}", result);
return result;
}