Commit 1872919d authored by whitlocb's avatar whitlocb
Browse files

I fixed a 5000 character limit with command line logging.



git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@8915 18c085ea-50e0-402c-830e-de6fd14e8384
parent d096c217
......@@ -33,6 +33,7 @@
<li>Parallel communication code in the compute engine, which was related to libsim, has been fixed so that libsim once again works with parallel simulations.</li>
<li>VisIt now clears metadata in the metadata server and the compute engine prior to restoring session files. This prevents old metadata from affecting how the session file loads and ensures that transient variables are detected.</li>
<li>VisIt no longer erroneously places plots into the error state when restoring sessions as could happen when the Engine Chooser window was active.</li>
<li>VisIt's macro recording feature no longer cuts off recorded commands and 5000 characters.</li>
</ul>
<p>Click the following link to view the release notes for the previous version
of VisIt: <a href="relnotes1.12.0.html">VisIt 1.12.0 Release Notes</a>.</p>
......
......@@ -222,134 +222,162 @@ LogFile_Write(const char *str)
#define MSG_NOT_IMPLEMENTED 0
#define MSG_UNSUPPORTED 1
static void MESSAGE_COMMENT(const char *name, char *str, int reason)
static std::string MESSAGE_COMMENT(const char *name, int reason)
{
std::string s;
if(reason == MSG_NOT_IMPLEMENTED)
{
SNPRINTF(str, SLEN, "# Logging for %s is not implemented yet.\n", name);
s = (std::string("# Logging for ") + name) + " is not implemented yet.\n";
}
else if(reason == MSG_UNSUPPORTED)
{
SNPRINTF(str, SLEN, "# The %s RPC is not supported in the VisIt module "
"so it will not be logged.\n", name);
s = (std::string("# The ") + name) + " RPC is not supported in the VisIt module "
"so it will not be logged.\n";
}
return s;
}
static void log_AddWindowRPC(ViewerRPC *rpc, char *str)
static std::string log_AddWindowRPC(ViewerRPC *rpc)
{
SNPRINTF(str, SLEN, "AddWindow()\n");
return std::string("AddWindow()\n");
}
static void log_DeleteWindowRPC(ViewerRPC *rpc, char *str)
static std::string log_DeleteWindowRPC(ViewerRPC *rpc)
{
SNPRINTF(str, SLEN, "DeleteWindow()\n");
return std::string("DeleteWindow()\n");
}
static void log_SetWindowLayoutRPC(ViewerRPC *rpc, char *str)
static std::string log_SetWindowLayoutRPC(ViewerRPC *rpc)
{
char str[SLEN];
SNPRINTF(str, SLEN, "SetWindowLayout(%d)\n", rpc->GetWindowLayout());
return std::string(str);
}
static void log_SetActiveWindowRPC(ViewerRPC *rpc, char *str)
static std::string log_SetActiveWindowRPC(ViewerRPC *rpc)
{
char str[SLEN];
SNPRINTF(str, SLEN, "SetActiveWindow(%d)\n", rpc->GetWindowId());
return std::string(str);
}
static void log_ClearWindowRPC(ViewerRPC *rpc, char *str)
static std::string log_ClearWindowRPC(ViewerRPC *rpc)
{
SNPRINTF(str, SLEN, "ClearWindow()\n");
return std::string("ClearWindow()\n");
}
static void log_ClearAllWindowsRPC(ViewerRPC *rpc, char *str)
static std::string log_ClearAllWindowsRPC(ViewerRPC *rpc)
{
SNPRINTF(str, SLEN, "ClearAllWindows()\n");
return std::string("ClearAllWindows()\n");
}
static void log_OpenDatabaseRPC(ViewerRPC *rpc, char *str)
static std::string log_OpenDatabaseRPC(ViewerRPC *rpc)
{
char str[SLEN];
SNPRINTF(str, SLEN, "OpenDatabase(\"%s\", %d)\n",
rpc->GetDatabase().c_str(),
rpc->GetIntArg1());
return std::string(str);
}
static void log_CloseDatabaseRPC(ViewerRPC *rpc, char *str)
static std::string log_CloseDatabaseRPC(ViewerRPC *rpc)
{
char str[SLEN];
SNPRINTF(str, SLEN, "OpenDatabase(\"%s\")\n",
rpc->GetDatabase().c_str());
return std::string(str);
}
static void log_ActivateDatabaseRPC(ViewerRPC *rpc, char *str)
static std::string log_ActivateDatabaseRPC(ViewerRPC *rpc)
{
char str[SLEN];
SNPRINTF(str, SLEN, "ActivateDatabase(\"%s\")\n",
rpc->GetDatabase().c_str());
return std::string(str);
}
static void log_CheckForNewStatesRPC(ViewerRPC *rpc, char *str)
static std::string log_CheckForNewStatesRPC(ViewerRPC *rpc)
{
char str[SLEN];
SNPRINTF(str, SLEN, "CheckForNewStates(\"%s\")\n",
rpc->GetDatabase().c_str());
return std::string(str);
}
static void log_CreateDatabaseCorrelationRPC(ViewerRPC *rpc, char *str)
static std::string log_CreateDatabaseCorrelationRPC(ViewerRPC *rpc)
{
std::string s("CreateDatabaseCorrelation(\"");
s += rpc->GetDatabase();
s += "\",(";
const stringVector &dbs = rpc->GetProgramOptions();
for(int i = 0; i < dbs.size(); ++i)
{
s += dbs[i];
if(i < dbs.size() - 1)
s += ", ";
}
SNPRINTF(str, SLEN, "%s), %d)\n", s.c_str(), rpc->GetIntArg1());
char str[SLEN];
std::string s("CreateDatabaseCorrelation(\"");
s += rpc->GetDatabase();
s += "\",(";
const stringVector &dbs = rpc->GetProgramOptions();
for(unsigned int i = 0; i < dbs.size(); ++i)
{
s += dbs[i];
if(i < dbs.size() - 1)
s += ", ";
}
SNPRINTF(str, SLEN, "%s), %d)\n", s.c_str(), rpc->GetIntArg1());
return std::string(str);
}
static void log_AlterDatabaseCorrelationRPC(ViewerRPC *rpc, char *str)
static std::string log_AlterDatabaseCorrelationRPC(ViewerRPC *rpc)
{
char str[SLEN];
std::string s("AlterDatabaseCorrelation(\"");
s += rpc->GetDatabase();
s += "\",(";
const stringVector &dbs = rpc->GetProgramOptions();
for(int i = 0; i < dbs.size(); ++i)
for(unsigned int i = 0; i < dbs.size(); ++i)
{
s += dbs[i];
if(i < dbs.size() - 1)
s += ", ";
}
SNPRINTF(str, SLEN, "%s), %d)\n", s.c_str(), rpc->GetIntArg1());
return std::string(str);
}
static void log_DeleteDatabaseCorrelationRPC(ViewerRPC *rpc, char *str)
static std::string log_DeleteDatabaseCorrelationRPC(ViewerRPC *rpc)
{
char str[SLEN];
SNPRINTF(str, SLEN, "DeleteDatabaseCorrelation(\"%s\")\n",
rpc->GetDatabase().c_str());
return std::string(str);
}
static void log_ReOpenDatabaseRPC(ViewerRPC *rpc, char *str)
static std::string log_ReOpenDatabaseRPC(ViewerRPC *rpc)
{
char str[SLEN];
SNPRINTF(str, SLEN, "OpenDatabase(\"%s\", %d)\n",
rpc->GetDatabase().c_str(),
rpc->GetIntArg1());
return std::string(str);
}
static void log_ReplaceDatabaseRPC(ViewerRPC *rpc, char *str)
static std::string log_ReplaceDatabaseRPC(ViewerRPC *rpc)
{
char str[SLEN];
SNPRINTF(str, SLEN, "ReplaceDatabase(\"%s\", %d)\n",
rpc->GetDatabase().c_str(),
rpc->GetIntArg1());
return std::string(str);
}
static void log_OverlayDatabaseRPC(ViewerRPC *rpc, char *str)
static std::string log_OverlayDatabaseRPC(ViewerRPC *rpc)
{
char str[SLEN];
SNPRINTF(str, SLEN, "OverlayDatabase(\"%s\")\n",
rpc->GetDatabase().c_str());
return std::string(str);
}
static void log_OpenComponentHelper(ViewerRPC *rpc, char *str, const char *mName)
static std::string log_OpenComponentHelper(ViewerRPC *rpc, const char *mName)
{
const stringVector &argv = rpc->GetProgramOptions();
char str[SLEN];
if(argv.size() == 0)
{
......@@ -364,7 +392,7 @@ static void log_OpenComponentHelper(ViewerRPC *rpc, char *str, const char *mName
else
{
std::string tmp("launchArguments = (");
for(int i = 0; i < argv.size(); ++i)
for(unsigned int i = 0; i < argv.size(); ++i)
{
tmp += "\"";
tmp += argv[i];
......@@ -376,68 +404,78 @@ static void log_OpenComponentHelper(ViewerRPC *rpc, char *str, const char *mName
SNPRINTF(str, SLEN, "%s%s(\"%s\", launchArguments)\n",
tmp.c_str(), mName, rpc->GetProgramHost().c_str());
}
return std::string(str);
}
static void log_OpenComputeEngineRPC(ViewerRPC *rpc, char *str)
static std::string log_OpenComputeEngineRPC(ViewerRPC *rpc)
{
log_OpenComponentHelper(rpc, str, "OpenComputeEngine");
return log_OpenComponentHelper(rpc, "OpenComputeEngine");
}
static void log_OpenMDServerRPC(ViewerRPC *rpc, char *str)
static std::string log_OpenMDServerRPC(ViewerRPC *rpc)
{
log_OpenComponentHelper(rpc, str, "OpenMDServer");
return log_OpenComponentHelper(rpc, "OpenMDServer");
}
static void log_CloseComputeEngineRPC(ViewerRPC *rpc, char *str)
static std::string log_CloseComputeEngineRPC(ViewerRPC *rpc)
{
char str[SLEN];
SNPRINTF(str, SLEN, "CloseComputeEngine(\"%s\", \"%s\")\n",
rpc->GetProgramHost().c_str(),
rpc->GetProgramSim().c_str());
return std::string(str);
}
static void log_AnimationSetNFramesRPC(ViewerRPC *rpc, char *str)
static std::string log_AnimationSetNFramesRPC(ViewerRPC *rpc)
{
char str[SLEN];
SNPRINTF(str, SLEN, "AnimationSetNFrames(%d)\n", rpc->GetNFrames());
return std::string(str);
}
static void log_AnimationPlayRPC(ViewerRPC *rpc, char *str)
static std::string log_AnimationPlayRPC(ViewerRPC *rpc)
{
MESSAGE_COMMENT("AnimationPlay", str, MSG_UNSUPPORTED);
return MESSAGE_COMMENT("AnimationPlay", MSG_UNSUPPORTED);
}
static void log_AnimationReversePlayRPC(ViewerRPC *rpc, char *str)
static std::string log_AnimationReversePlayRPC(ViewerRPC *rpc)
{
MESSAGE_COMMENT("AnimationReversePlay", str, MSG_UNSUPPORTED);
return MESSAGE_COMMENT("AnimationReversePlay", MSG_UNSUPPORTED);
}
static void log_AnimationStopRPC(ViewerRPC *rpc, char *str)
static std::string log_AnimationStopRPC(ViewerRPC *rpc)
{
MESSAGE_COMMENT("AnimationStop", str, MSG_UNSUPPORTED);
return MESSAGE_COMMENT("AnimationStop", MSG_UNSUPPORTED);
}
static void log_TimeSliderNextStateRPC(ViewerRPC *rpc, char *str)
static std::string log_TimeSliderNextStateRPC(ViewerRPC *rpc)
{
SNPRINTF(str, SLEN, "TimeSliderNextState()\n");
return std::string("TimeSliderNextState()\n");
}
static void log_TimeSliderPreviousStateRPC(ViewerRPC *rpc, char *str)
static std::string log_TimeSliderPreviousStateRPC(ViewerRPC *rpc)
{
SNPRINTF(str, SLEN, "TimeSliderPreviousState\n");
return std::string("TimeSliderPreviousState()\n");
}
static void log_SetTimeSliderStateRPC(ViewerRPC *rpc, char *str)
static std::string log_SetTimeSliderStateRPC(ViewerRPC *rpc)
{
char str[SLEN];
SNPRINTF(str, SLEN, "SetTimeSliderState(%d)\n", rpc->GetStateNumber());
return std::string(str);
}
static void log_SetActiveTimeSliderRPC(ViewerRPC *rpc, char *str)
static std::string log_SetActiveTimeSliderRPC(ViewerRPC *rpc)
{
char str[SLEN];
SNPRINTF(str, SLEN, "SetActiveTimeSlider(\"%s\")\n",
rpc->GetDatabase().c_str());
return std::string(str);
}
static void log_AddPlotRPC(ViewerRPC *rpc, char *str)
static std::string log_AddPlotRPC(ViewerRPC *rpc)
{
char str[SLEN];
std::string plotName("?");
PlotPluginManager *pluginManager = viewer->GetPlotPluginManager();
std::string id(pluginManager->GetEnabledID(rpc->GetPlotType()));
......@@ -453,54 +491,61 @@ static void log_AddPlotRPC(ViewerRPC *rpc, char *str)
rpc->GetVariable().c_str(),
inheritSILRestriction,
applyOperator);
return std::string(str);
}
static void log_SetPlotFrameRangeRPC(ViewerRPC *rpc, char *str)
static std::string log_SetPlotFrameRangeRPC(ViewerRPC *rpc)
{
char str[SLEN];
SNPRINTF(str, SLEN, "SetPlotFrameRange(%d, %d, %d)\n",
rpc->GetIntArg1(), rpc->GetIntArg2(), rpc->GetIntArg3());
return std::string(str);
}
static void log_DeletePlotKeyframeRPC(ViewerRPC *rpc, char *str)
static std::string log_DeletePlotKeyframeRPC(ViewerRPC *rpc)
{
char str[SLEN];
SNPRINTF(str, SLEN, "DeletePlotKeyframe(%d, %d)\n",
rpc->GetIntArg1(), rpc->GetIntArg2());
return std::string(str);
}
static void log_MovePlotKeyframeRPC(ViewerRPC *rpc, char *str)
static std::string log_MovePlotKeyframeRPC(ViewerRPC *rpc)
{
char str[SLEN];
SNPRINTF(str, SLEN, "MovePlotKeyframe(%d, %d, %d)\n",
rpc->GetIntArg1(), rpc->GetIntArg2(), rpc->GetIntArg3());
return std::string(str);
}
static void log_DeleteActivePlotsRPC(ViewerRPC *rpc, char *str)
static std::string log_DeleteActivePlotsRPC(ViewerRPC *rpc)
{
SNPRINTF(str, SLEN, "DeleteActivePlots()\n");
return std::string("DeleteActivePlots()\n");
}
static void log_HideActivePlotsRPC(ViewerRPC *rpc, char *str)
static std::string log_HideActivePlotsRPC(ViewerRPC *rpc)
{
SNPRINTF(str, SLEN, "HideActivePlots()\n");
return std::string("HideActivePlots()\n");
}
static void log_DrawPlotsRPC(ViewerRPC *rpc, char *str)
static std::string log_DrawPlotsRPC(ViewerRPC *rpc)
{
SNPRINTF(str, SLEN, "DrawPlots()\n");
return std::string("DrawPlots()\n");
}
static void log_DisableRedrawRPC(ViewerRPC *rpc, char *str)
static std::string log_DisableRedrawRPC(ViewerRPC *rpc)
{
SNPRINTF(str, SLEN, "DisableRedraw()\n");
return std::string("DisableRedraw()\n");
}
static void log_RedrawRPC(ViewerRPC *rpc, char *str)
static std::string log_RedrawRPC(ViewerRPC *rpc)
{
SNPRINTF(str, SLEN, "RedrawWindow()\n");
return std::string("RedrawWindow()\n");
}
static void log_SetActivePlotsRPC(ViewerRPC *rpc, char *str)
static std::string log_SetActivePlotsRPC(ViewerRPC *rpc)
{
char str[SLEN];
int slen = SLEN;
const intVector &ids = rpc->GetActivePlotIds();
char *sptr = str;
......@@ -511,7 +556,7 @@ static void log_SetActivePlotsRPC(ViewerRPC *rpc, char *str)
L = SNPRINTF(sptr, slen, "(");
sptr += L, slen -= L;
}
for(int i = 0; i < ids.size(); ++i)
for(unsigned int i = 0; i < ids.size(); ++i)
{
L = SNPRINTF(sptr, slen, "%d", ids[i]);
sptr += L, slen -= L;
......@@ -527,16 +572,20 @@ static void log_SetActivePlotsRPC(ViewerRPC *rpc, char *str)
sptr += L, slen -= L;
}
SNPRINTF(sptr, slen, ")\n");
return std::string(str);
}
static void log_ChangeActivePlotsVarRPC(ViewerRPC *rpc, char *str)
static std::string log_ChangeActivePlotsVarRPC(ViewerRPC *rpc)
{
char str[SLEN];
SNPRINTF(str, SLEN, "ChangeActivePlotsVar(\"%s\")\n",
rpc->GetVariable().c_str());
return std::string(str);
}
static void log_AddOperatorRPC(ViewerRPC *rpc, char *str)
static std::string log_AddOperatorRPC(ViewerRPC *rpc)
{
char str[SLEN];
std::string operatorName("?");
OperatorPluginManager *pluginManager = viewer->GetOperatorPluginManager();
std::string id(pluginManager->GetEnabledID(rpc->GetOperatorType()));
......@@ -549,46 +598,57 @@ static void log_AddOperatorRPC(ViewerRPC *rpc, char *str)
SNPRINTF(str, SLEN, "AddOperator(\"%s\", %d)\n",
operatorName.c_str(),
applyAll);
return std::string(str);
}
static void log_PromoteOperatorRPC(ViewerRPC *rpc, char *str)
static std::string log_PromoteOperatorRPC(ViewerRPC *rpc)
{
char str[SLEN];
int applyAll = viewer->GetViewerState()->GetGlobalAttributes()->GetApplyOperator() ? 1 : 0;
SNPRINTF(str, SLEN, "PromoteOperator(%d, %d)\n", rpc->GetOperatorType(),
applyAll);
return std::string(str);
}
static void log_DemoteOperatorRPC(ViewerRPC *rpc, char *str)
static std::string log_DemoteOperatorRPC(ViewerRPC *rpc)
{
char str[SLEN];
int applyAll = viewer->GetViewerState()->GetGlobalAttributes()->GetApplyOperator() ? 1 : 0;
SNPRINTF(str, SLEN, "DemoteOperator(%d, %d)\n", rpc->GetOperatorType(),
applyAll);
return std::string(str);
}
static void log_RemoveOperatorRPC(ViewerRPC *rpc, char *str)
static std::string log_RemoveOperatorRPC(ViewerRPC *rpc)
{
char str[SLEN];
int applyAll = viewer->GetViewerState()->GetGlobalAttributes()->GetApplyOperator() ? 1 : 0;
SNPRINTF(str, SLEN, "RemoveOperator(%d, %d)\n", rpc->GetOperatorType(),
applyAll);
return std::string(str);
}
static void log_RemoveLastOperatorRPC(ViewerRPC *rpc, char *str)
static std::string log_RemoveLastOperatorRPC(ViewerRPC *rpc)
{
char str[SLEN];
int applyAll = viewer->GetViewerState()->GetGlobalAttributes()->GetApplyOperator() ? 1 : 0;
SNPRINTF(str, SLEN, "RemoveLastOperator(%d)\n", applyAll);
return std::string(str);
}
static void log_RemoveAllOperatorsRPC(ViewerRPC *rpc, char *str)
static std::string log_RemoveAllOperatorsRPC(ViewerRPC *rpc)
{
char str[SLEN];
int applyAll = viewer->GetViewerState()->GetGlobalAttributes()->GetApplyOperator() ? 1 : 0;
SNPRINTF(str, SLEN, "RemoveAllOperators(%d)\n", applyAll);
return std::string(str);
}
static void log_SaveWindowRPC(ViewerRPC *rpc, char *str)
static std::string log_SaveWindowRPC(ViewerRPC *rpc)
{
std::string s(PySaveWindowAttributes_GetLogString());
s += "SetSaveWindowAttributes(SaveWindowAtts)\n";
SNPRINTF(str, SLEN, "%sSaveWindow()\n", s.c_str());
return s;
}
static void log_SetPlotOptionsHelper(ViewerRPC *rpc, std::string &atts,
......@@ -608,24 +668,24 @@ static void log_SetPlotOptionsHelper(ViewerRPC *rpc, std::string &atts,
}
}
static void log_SetDefaultPlotOptionsRPC(ViewerRPC *rpc, char *str)
static std::string log_SetDefaultPlotOptionsRPC(ViewerRPC *rpc)
{
std::string atts(""), plotName("");
log_SetPlotOptionsHelper(rpc, atts, plotName);
atts += "SetDefaultPlotOptions(";
atts += plotName;
atts += ")\n";
SNPRINTF(str, SLEN, "%s", atts.c_str());
return atts;
}
static void log_SetPlotOptionsRPC(ViewerRPC *rpc, char *str)
static std::string log_SetPlotOptionsRPC(ViewerRPC *rpc)
{
std::string atts(""), plotName("");
log_SetPlotOptionsHelper(rpc, atts, plotName);
atts += "SetPlotOptions(";
atts += plotName;
atts += ")\n";
SNPRINTF(str, SLEN, "%s", atts.c_str());
return atts;
}
static void log_SetOperatorOptionsHelper(ViewerRPC *rpc, std::string &atts,
......@@ -645,17 +705,17 @@ static void log_SetOperatorOptionsHelper(ViewerRPC *rpc, std::string &atts,
}
}
static void log_SetDefaultOperatorOptionsRPC(ViewerRPC *rpc, char *str)
static std::string log_SetDefaultOperatorOptionsRPC(ViewerRPC *rpc)
{
std::string atts(""), operatorName("");
log_SetOperatorOptionsHelper(rpc, atts, operatorName);
atts += "SetDefaultOperatorOptions(";
atts += operatorName;
atts += ")\n";
SNPRINTF(str, SLEN, "%s", atts.c_str());
return atts;
}
static void log_SetOperatorOptionsRPC(ViewerRPC *rpc, char *str)
static std::string log_SetOperatorOptionsRPC(ViewerRPC *rpc)
{
std::string atts(""), operatorName("");
bool applyOperator = viewer->GetViewerState()->GetGlobalAttributes()->GetApplyOperator();
......@@ -665,63 +725,66 @@ static void log_SetOperatorOptionsRPC(ViewerRPC *rpc, char *str)
atts += ", ";
atts += (applyOperator ? "1" : "0");
atts += ")\n";
SNPRINTF(str, SLEN, "%s", atts.c_str());
return atts;
}
static void log_AddInitializedOperatorRPC(ViewerRPC *rpc, char *str)
static std::string log_AddInitializedOperatorRPC(ViewerRPC *rpc)
{
char tmp1[SLEN], tmp2[SLEN];
log_AddOperatorRPC(rpc, tmp1);
log_SetOperatorOptionsRPC(rpc, tmp2);
SNPRINTF(str, SLEN, "%s%s", tmp1, tmp2);
std::string s;
s = log_AddOperatorRPC(rpc);
s += log_SetOperatorOptionsRPC(rpc);
return s;
}
static void log_WriteConfigFileRPC(ViewerRPC *rpc, char *str)
static std::string log_WriteConfigFileRPC(ViewerRPC *rpc)
{
SNPRINTF(str, SLEN, "WriteConfigFile()\n");
return std::string("WriteConfigFile()\n");
}
static void log_IconifyAllWindowsRPC(ViewerRPC *rpc, char *str)
static std::string log_IconifyAllWindowsRPC(ViewerRPC *rpc)
{
SNPRINTF(str, SLEN, "IconifyAllWindows()\n");
return std::string("IconifyAllWindows()\n");
}
static void log_DeIconifyAllWindowsRPC(ViewerRPC *rpc, char *str)
static std::string log_DeIconifyAllWindowsRPC(ViewerRPC *rpc)
{
SNPRINTF(str, SLEN, "DeIconifyAllWindows()\n");
return std::string("DeIconifyAllWindows()\n");
}
static void log_ShowAllWindowsRPC(ViewerRPC *rpc, char *str)
static std::string log_ShowAllWindowsRPC(ViewerRPC *rpc)
{
SNPRINTF(str, SLEN, "ShowAllWindows()\n");
return std::string("ShowAllWindows()\n");
}