MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / logFile

Function logFile

SRC/tcl/commands.cpp:8906–8933  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8904}
8905
8906int
8907logFile(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv)
8908{
8909
8910 if (argc < 2) {
8911 opserr << "WARNING logFile fileName? - no filename supplied\n";
8912 return TCL_ERROR;
8913 }
8914 openMode mode = OVERWRITE;
8915 bool echo = true;
8916
8917 int cArg = 2;
8918 while (cArg < argc) {
8919 if (strcmp(argv[cArg],"-append") == 0)
8920 mode = APPEND;
8921 if (strcmp(argv[cArg],"-noEcho") == 0)
8922 echo = false;
8923 cArg++;
8924 }
8925
8926 if (opserr.setFile(argv[1], mode, echo) < 0)
8927 opserr << "WARNING logFile " << argv[1] << " failed to set the file\n";
8928
8929 const char *pwd = getInterpPWD(interp);
8930 simulationInfo.addOutputFile(argv[1], pwd);
8931
8932 return TCL_OK;
8933}
8934
8935
8936int

Callers

nothing calls this directly

Calls 3

getInterpPWDFunction · 0.70
setFileMethod · 0.45
addOutputFileMethod · 0.45

Tested by

no test coverage detected