Prevent from closing the simulator just because it can't write to the logger file
This commit is contained in:
parent
3667e5de3c
commit
56aa2cd479
1 changed files with 4 additions and 4 deletions
|
@ -41,9 +41,6 @@ FGLogger::init ()
|
||||||
if (!child->getBoolValue("enabled", false))
|
if (!child->getBoolValue("enabled", false))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
_logs.emplace_back(new Log());
|
|
||||||
Log &log = *_logs.back();
|
|
||||||
|
|
||||||
string filename = child->getStringValue("filename");
|
string filename = child->getStringValue("filename");
|
||||||
if (filename.empty()) {
|
if (filename.empty()) {
|
||||||
filename = "fg_log.csv";
|
filename = "fg_log.csv";
|
||||||
|
@ -66,9 +63,12 @@ FGLogger::init ()
|
||||||
"folder (" + (globals->get_fg_home() / "Export").utf8Str() + ").";
|
"folder (" + (globals->get_fg_home() / "Export").utf8Str() + ").";
|
||||||
|
|
||||||
SG_LOG(SG_GENERAL, SG_ALERT, msg);
|
SG_LOG(SG_GENERAL, SG_ALERT, msg);
|
||||||
exit(EXIT_FAILURE);
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_logs.emplace_back(new Log());
|
||||||
|
Log &log = *_logs.back();
|
||||||
|
|
||||||
string delimiter = child->getStringValue("delimiter");
|
string delimiter = child->getStringValue("delimiter");
|
||||||
if (delimiter.empty()) {
|
if (delimiter.empty()) {
|
||||||
delimiter = ",";
|
delimiter = ",";
|
||||||
|
|
Loading…
Add table
Reference in a new issue