| 8904 | } |
| 8905 | |
| 8906 | int |
| 8907 | logFile(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 | |
| 8936 | int |
nothing calls this directly
no test coverage detected