Skip to content

Commit

Permalink
only log abort messages in desktop mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jjallaire committed Sep 26, 2012
1 parent d8be83c commit 2ceb645
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/cpp/r/session/RSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,10 +530,17 @@ Error initialize()

void rSuicide(const std::string& msg)
{
FilePath abendLogPath = s_options.logPath.complete("rsession_abort_msg.log");
Error error = core::writeStringToFile(abendLogPath, msg);
if (error)
LOG_ERROR(error);
// log abort message if we are in desktop mode
if (!s_options.serverMode)
{
FilePath abendLogPath = s_options.logPath.complete(
"rsession_abort_msg.log");
Error error = core::writeStringToFile(abendLogPath, msg);
if (error)
LOG_ERROR(error);
}


R_Suicide(msg.c_str());
}

Expand Down

0 comments on commit 2ceb645

Please sign in to comment.