Use CRLF line endings for the log file on Windows

This commit is contained in:
Cameron Gutman 2022-11-02 19:19:00 -05:00
parent 8fcc98102b
commit 09ce3c9ce4

View file

@ -305,7 +305,7 @@ int main(int argc, char *argv[])
#ifdef LOG_TO_FILE #ifdef LOG_TO_FILE
QDir tempDir(Path::getLogDir()); QDir tempDir(Path::getLogDir());
s_LoggerFile = new QFile(tempDir.filePath(QString("Moonlight-%1.log").arg(QDateTime::currentSecsSinceEpoch()))); s_LoggerFile = new QFile(tempDir.filePath(QString("Moonlight-%1.log").arg(QDateTime::currentSecsSinceEpoch())));
if (s_LoggerFile->open(QIODevice::WriteOnly)) { if (s_LoggerFile->open(QIODevice::WriteOnly | QIODevice::Text)) {
QTextStream(stderr) << "Redirecting log output to " << s_LoggerFile->fileName() << Qt::endl; QTextStream(stderr) << "Redirecting log output to " << s_LoggerFile->fileName() << Qt::endl;
s_LoggerStream.setDevice(s_LoggerFile); s_LoggerStream.setDevice(s_LoggerFile);
} }