mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-31 04:25:40 +00:00
(Android) Added error output if attempting to write to log file before it was open
This commit is contained in:
parent
c8d9d100cf
commit
1d6701ca4c
|
@ -83,9 +83,16 @@ Log::~Log()
|
|||
|
||||
if (!sFile.is_open()) {
|
||||
// Not open yet, print to stdout.
|
||||
#if defined(__ANDROID__)
|
||||
__android_log_print(
|
||||
ANDROID_LOG_ERROR, nullptr,
|
||||
"Error: Tried to write to log file before it was open, the following won't be logged:");
|
||||
__android_log_print(ANDROID_LOG_ERROR, nullptr, "%s", mOutStringStream.str().c_str());
|
||||
#else
|
||||
std::cerr << "Error: Tried to write to log file before it was open, "
|
||||
"the following won't be logged:\n";
|
||||
std::cerr << mOutStringStream.str();
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue