| 778 | } |
| 779 | |
| 780 | Status ImpalaServer::InitProfileLogging() { |
| 781 | if (!FLAGS_log_query_to_file) return Status::OK(); |
| 782 | |
| 783 | if (FLAGS_profile_log_dir.empty()) { |
| 784 | stringstream ss; |
| 785 | ss << FLAGS_log_dir << "/profiles/"; |
| 786 | FLAGS_profile_log_dir = ss.str(); |
| 787 | } |
| 788 | profile_logger_.reset(new SimpleLogger(FLAGS_profile_log_dir, |
| 789 | PROFILE_LOG_FILE_PREFIX, FLAGS_max_profile_log_file_size, |
| 790 | FLAGS_max_profile_log_files)); |
| 791 | RETURN_IF_ERROR(profile_logger_->Init()); |
| 792 | RETURN_IF_ERROR(Thread::Create("impala-server", "log-flush-thread", |
| 793 | &ImpalaServer::LogFileFlushThread, this, &profile_log_file_flush_thread_)); |
| 794 | |
| 795 | return Status::OK(); |
| 796 | } |
| 797 | |
| 798 | Status ImpalaServer::AppendAuditEntry(const string& entry ) { |
| 799 | DCHECK(IsAuditEventLoggingEnabled()); |