Auto merge of #27157 - servo:jdm-patch-44, r=jdm

Enable stdout logging for all UWP builds

Fixes #27156.
This commit is contained in:
bors-servo 2020-07-02 23:08:45 -04:00 committed by GitHub
commit 48a76a97d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -221,17 +221,8 @@ Servo::Servo(hstring args, GLsizei width, GLsizei height,
sServo = this; // FIXME;
#ifndef _DEBUG
char buffer[1024];
bool logToFile = GetEnvironmentVariableA("FirefoxRealityLogStdout", buffer,
sizeof(buffer)) != 0;
#else
bool logToFile = true;
#endif
if (logToFile) {
auto current = ApplicationData::Current();
auto filePath =
std::wstring(current.LocalFolder().Path()) + L"\\stdout.txt";
auto filePath = std::wstring(current.LocalFolder().Path()) + L"\\stdout.txt";
sLogHandle =
CreateFile2(filePath.c_str(), GENERIC_WRITE, 0, CREATE_ALWAYS, nullptr);
if (sLogHandle == INVALID_HANDLE_VALUE) {
@ -245,7 +236,6 @@ Servo::Servo(hstring args, GLsizei width, GLsizei height,
"Failed to set file pointer to the end of file: error code " +
std::to_string(GetLastError()));
}
}
capi::CHostCallbacks c;
c.on_load_started = &on_load_started;