зеркало из https://github.com/microsoft/CCF.git
Fix logging host_level schema (#3463)
This commit is contained in:
Родитель
2f9078a3aa
Коммит
e862af2417
|
@ -280,7 +280,7 @@
|
|||
"properties": {
|
||||
"host_level": {
|
||||
"type": "string",
|
||||
"enum": ["info", "fail", "fatal"],
|
||||
"enum": ["trace", "debug", "info", "fail", "fatal"],
|
||||
"default": "info",
|
||||
"description": "Logging level for the untrusted host. Note: while it is possible to set the host log level at startup, it is deliberately not possible to change the log level of the enclave without rebuilding it and changing its code identity."
|
||||
},
|
||||
|
|
|
@ -85,9 +85,8 @@ int main(int argc, char** argv)
|
|||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
LOG_FAIL_FMT(
|
||||
"Error parsing configuration file {}: {}", config_file_path, e.what());
|
||||
return 1;
|
||||
throw std::logic_error(fmt::format(
|
||||
"Error parsing configuration file {}: {}", config_file_path, e.what()));
|
||||
}
|
||||
|
||||
auto config_json = nlohmann::json(config);
|
||||
|
@ -96,11 +95,10 @@ int main(int argc, char** argv)
|
|||
auto schema_error_msg = json::validate_json(config_json, schema_json);
|
||||
if (schema_error_msg.has_value())
|
||||
{
|
||||
LOG_FAIL_FMT(
|
||||
throw std::logic_error(fmt::format(
|
||||
"Error validating JSON schema for configuration file {}: {}",
|
||||
config_file_path,
|
||||
schema_error_msg.value());
|
||||
return 1;
|
||||
schema_error_msg.value()));
|
||||
}
|
||||
|
||||
if (config.logging.format == host::LogFormat::JSON)
|
||||
|
|
Загрузка…
Ссылка в новой задаче