Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Commit

Permalink
Change log location
Browse files Browse the repository at this point in the history
  • Loading branch information
nonperforming committed Nov 13, 2022
1 parent 9098aa5 commit 5b1d7b0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Sources/Core/Debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ namespace spades {

void StartLog() {
attemptedToInitializeLog = true;
logStream = FileManager::OpenForWriting("SystemMessages.log");
logStream = FileManager::OpenForWriting("OpenSpadesPlus.log");

logStream->Write(accumlatedLog);
accumlatedLog.clear();
Expand Down Expand Up @@ -251,7 +251,7 @@ namespace spades {
std::string outStr = EscapeControlCharacters(buf);
printf("%s", outStr.c_str());

// (2) The log file a.k.a. `SystemMessages.log`
// (2) The log file a.k.a. `OpenSpadesPlus.log`
if (logStream || !attemptedToInitializeLog) {

if (attemptedToInitializeLog) {
Expand Down
6 changes: 3 additions & 3 deletions Sources/Gui/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ int main(int argc, char **argv) {

#endif

// start log output to SystemMessages.log
// start log output to OpenSpadesPlus.log
try {
spades::StartLog();
} catch (const std::exception &ex) {
Expand All @@ -479,7 +479,7 @@ int main(int argc, char **argv) {
"Failed to start recording log because of the following error:\n{0}\n\n"
"OpenSpades+ will continue to run, but any critical events are not logged.",
ex.what());
if (SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_WARNING, "OpenSpades Log System Failure",
if (SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_WARNING, "OpenSpades+ Log System Failure",
msg.c_str(), splashWindow->GetWindow())) {
// showing dialog failed.
}
Expand Down Expand Up @@ -670,7 +670,7 @@ int main(int argc, char **argv) {
std::string msg = ex.what();
msg = _Tr("Main",
"A serious error caused OpenSpades+ to stop working:\n\n{0}\n\nSee "
"SystemMessages.log for more details.",
"OpenSpadesPlus.log for more details.",
msg);

SPLog("[!] Terminating due to the fatal error: %s", ex.what());
Expand Down
6 changes: 3 additions & 3 deletions Sources/Gui/Runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ namespace spades {
if (!err.empty()) {

std::string msg = err;
msg = _Tr("Main", "A serious error caused OpenSpades to stop "
"working:\n\n{0}\n\nSee SystemMessages.log for more details.",
msg = _Tr("Main", "A serious error caused OpenSpades+ to stop "
"working:\n\n{0}\n\nSee OpenSpadesPlus.log for more details.",
msg);

SDL_InitSubSystem(SDL_INIT_VIDEO);
if (SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
_Tr("Main", "OpenSpades Fatal Error").c_str(),
_Tr("Main", "OpenSpades+ Fatal Error").c_str(),
msg.c_str(), nullptr)) {
// showing dialog failed.
// TODO: do appropriate action
Expand Down

0 comments on commit 5b1d7b0

Please sign in to comment.