Change log fatal

This commit is contained in:
John Zhao
2018-05-30 12:31:54 +08:00
parent b4f73dfa0b
commit 240b18270b
4 changed files with 33 additions and 32 deletions

View File

@@ -177,7 +177,7 @@ std::int32_t Channels::GetControlValue(const Option &option) const {
LOG(WARNING) << option << " get value useless";
return -1;
default:
LOG(FATAL) << "Unsupported option " << option;
LOG(ERROR) << "Unsupported option " << option;
}
return -1;
}
@@ -241,7 +241,7 @@ void Channels::SetControlValue(const Option &option, std::int32_t value) {
LOG(WARNING) << option << " set value useless";
break;
default:
LOG(FATAL) << "Unsupported option " << option;
LOG(ERROR) << "Unsupported option " << option;
}
}
@@ -265,7 +265,8 @@ bool Channels::RunControlAction(const Option &option) const {
LOG(WARNING) << option << " run action useless";
return false;
default:
LOG(FATAL) << "Unsupported option " << option;
LOG(ERROR) << "Unsupported option " << option;
return false;
}
}

View File

@@ -125,7 +125,8 @@ Streams::~Streams() {
void Streams::ConfigStream(
const Capabilities &capability, const StreamRequest &request) {
if (!IsStreamCapability(capability)) {
LOG(FATAL) << "Cannot config stream without stream capability";
LOG(ERROR) << "Cannot config stream without stream capability";
return;
}
VLOG(2) << "Config stream request of " << capability << ", " << request;
stream_config_requests_[capability] = request;
@@ -171,7 +172,8 @@ void Streams::WaitForStreams() {
std::unique_lock<std::mutex> lock(mtx_);
auto ready = std::bind(&Streams::HasKeyStreamDatas, this);
if (!ready() && !cv_.wait_for(lock, std::chrono::seconds(2), ready)) {
LOG(FATAL) << "Timeout waiting for key frames";
LOG(FATAL) << "Timeout waiting for key frames. Please use USB 3.0, and not "
"in virtual machine.";
}
}