Move logging of OS freezes to WARNING.
This commit is contained in:
parent
11c9f78538
commit
44c58ee242
@ -1062,8 +1062,8 @@ Status SessionConnection::do_flush() {
|
|||||||
auto result = raw_connection_->flush(auth_data_->get_auth_key(), *this);
|
auto result = raw_connection_->flush(auth_data_->get_auth_key(), *this);
|
||||||
auto elapsed_time = Time::now() - start_time;
|
auto elapsed_time = Time::now() - start_time;
|
||||||
if (elapsed_time >= 0.1) {
|
if (elapsed_time >= 0.1) {
|
||||||
LOG(ERROR) << "RawConnection::flush took " << elapsed_time << " seconds, written " << last_write_size_
|
LOG(WARNING) << "RawConnection::flush took " << elapsed_time << " seconds, written " << last_write_size_
|
||||||
<< " bytes, read " << last_read_size_ << " bytes and returned " << result;
|
<< " bytes, read " << last_read_size_ << " bytes and returned " << result;
|
||||||
}
|
}
|
||||||
if (result.is_error()) {
|
if (result.is_error()) {
|
||||||
return result;
|
return result;
|
||||||
|
@ -256,7 +256,7 @@ class SslCtxImpl {
|
|||||||
auto r_ssl_ctx_ptr = do_create_ssl_ctx(cert_file, verify_peer);
|
auto r_ssl_ctx_ptr = do_create_ssl_ctx(cert_file, verify_peer);
|
||||||
auto elapsed_time = Time::now() - start_time;
|
auto elapsed_time = Time::now() - start_time;
|
||||||
if (elapsed_time >= 0.1) {
|
if (elapsed_time >= 0.1) {
|
||||||
LOG(ERROR) << "SSL context creation took " << elapsed_time << " seconds";
|
LOG(WARNING) << "SSL context creation took " << elapsed_time << " seconds";
|
||||||
}
|
}
|
||||||
if (r_ssl_ctx_ptr.is_error()) {
|
if (r_ssl_ctx_ptr.is_error()) {
|
||||||
return r_ssl_ctx_ptr.move_as_error();
|
return r_ssl_ctx_ptr.move_as_error();
|
||||||
|
@ -125,7 +125,7 @@ struct SslHandleDeleter {
|
|||||||
SSL_free(ssl_handle);
|
SSL_free(ssl_handle);
|
||||||
auto elapsed_time = Time::now() - start_time;
|
auto elapsed_time = Time::now() - start_time;
|
||||||
if (elapsed_time >= 0.1) {
|
if (elapsed_time >= 0.1) {
|
||||||
LOG(ERROR) << "SSL_free took " << elapsed_time << " seconds";
|
LOG(WARNING) << "SSL_free took " << elapsed_time << " seconds";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -207,8 +207,8 @@ class SslStreamImpl {
|
|||||||
auto size = SSL_write(ssl_handle_.get(), slice.data(), static_cast<int>(slice.size()));
|
auto size = SSL_write(ssl_handle_.get(), slice.data(), static_cast<int>(slice.size()));
|
||||||
auto elapsed_time = Time::now() - start_time;
|
auto elapsed_time = Time::now() - start_time;
|
||||||
if (elapsed_time >= 0.1) {
|
if (elapsed_time >= 0.1) {
|
||||||
LOG(ERROR) << "SSL_write of size " << slice.size() << " took " << elapsed_time << " seconds and returned " << size
|
LOG(WARNING) << "SSL_write of size " << slice.size() << " took " << elapsed_time << " seconds and returned "
|
||||||
<< ' ' << SSL_get_error(ssl_handle_.get(), size);
|
<< size << ' ' << SSL_get_error(ssl_handle_.get(), size);
|
||||||
}
|
}
|
||||||
if (size <= 0) {
|
if (size <= 0) {
|
||||||
return process_ssl_error(size);
|
return process_ssl_error(size);
|
||||||
@ -222,8 +222,8 @@ class SslStreamImpl {
|
|||||||
auto size = SSL_read(ssl_handle_.get(), slice.data(), static_cast<int>(slice.size()));
|
auto size = SSL_read(ssl_handle_.get(), slice.data(), static_cast<int>(slice.size()));
|
||||||
auto elapsed_time = Time::now() - start_time;
|
auto elapsed_time = Time::now() - start_time;
|
||||||
if (elapsed_time >= 0.1) {
|
if (elapsed_time >= 0.1) {
|
||||||
LOG(ERROR) << "SSL_read took " << elapsed_time << " seconds and returned " << size << ' '
|
LOG(WARNING) << "SSL_read took " << elapsed_time << " seconds and returned " << size << ' '
|
||||||
<< SSL_get_error(ssl_handle_.get(), size);
|
<< SSL_get_error(ssl_handle_.get(), size);
|
||||||
}
|
}
|
||||||
if (size <= 0) {
|
if (size <= 0) {
|
||||||
return process_ssl_error(size);
|
return process_ssl_error(size);
|
||||||
|
@ -98,7 +98,7 @@ void FileLog::do_append(int log_level, CSlice slice) {
|
|||||||
auto total_time = Time::now() - start_time;
|
auto total_time = Time::now() - start_time;
|
||||||
if (total_time >= 0.1 && log_level >= 1) {
|
if (total_time >= 0.1 && log_level >= 1) {
|
||||||
auto thread_id = get_thread_id();
|
auto thread_id = get_thread_id();
|
||||||
auto r_size = fd_.write(PSLICE() << "[ 1][t" << (0 <= thread_id && thread_id < 10 ? " " : "") << thread_id
|
auto r_size = fd_.write(PSLICE() << "[ 2][t" << (0 <= thread_id && thread_id < 10 ? " " : "") << thread_id
|
||||||
<< "] !!! Previous logging took " << total_time << " seconds !!!\n");
|
<< "] !!! Previous logging took " << total_time << " seconds !!!\n");
|
||||||
r_size.ignore();
|
r_size.ignore();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user