MLStopLoggingStreamToFile (C Function)
MLStopLoggingStreamToFile has been replaced by WSStopLoggingStreamToFile.
int MLStopLoggingStreamToFile(MLINK l, const char *n)
disables logging of the stream activity for the MathLink connection specified by l to the file named by n.
Details
- MLStopLoggingStreamToFile() closes the file named by n.
- MLStopLoggingStreamToFile() only disables logging to the file named by n for l. If l logs to more than one file in a given session, MathLink will continue to log events to those files.
- MLStopLoggingStreamToFile() returns 0 on error and a nonzero value on success.
- MLStopLoggingStreamToFile() is declared in the MathLink header file mathlink.h.
Examples
Basic Examples (1)
#include "mathlink.h"
int main(int argc, char **argv)
{
MLENV env;
MLINK link;
int error;
int apiResult;
env = MLInitialize((MLEnvironmentParameter)0);
if(env == (MLENV)0)
{ /* Unable to create MathLink environment object */ }
link = MLOpenArgcArgv(env, argc, argv, &error);
if(link == (MLINK)0 || error != MLEOK)
{ /* Unable to create the MathLink link object */ }
MLActivate(link);
apiResult = MLLogStreamToFile(link, "/tmp/link.log");
{ /* Unable to log to link.log */ }
apiResult = MLLogStreamToFile(link, "/path/to/another/link.log");
{ /* Unable to log to the other link.log */ }
/* ... */
apiResult = MLStopLoggingStreamToFile(link, "/tmp/link.log");
{ /* Error while disabling logging */ }
/* ... */
apiResult = MLStopLoggingStream(link);
{ /* Error while shutting down logging */ }
MLClose(link);
MLDeinitialize(env);
}