WSDisableLoggingStream()
This feature is not supported on the Wolfram Cloud.

int WSDisableLoggingStream(WSLINK l)
disables logging of the stream contents for the WSTP connection specified by l.

DetailsDetails

  • WSDisableLoggingStream() and WSEnableLoggingStream() act as a toggle API mechanism for enabling and disabling logging on a link.
  • WSDisableLoggingStream() returns 0 on error and a nonzero value on success.
  • WSDisableLoggingStream() is declared in the WSTP header file wstp.h.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

#include "wstp.h"

int main(int argc, char **argv)
{
    MLENV env;
    MLINK link;
    int error;
    int apiResult;

    env = WSInitialize((WSEnvironmentParameter)0);
    if(env == (MLENV)0)
    { /* Unable to create WSTP environment object */ }

    link = WSOpenArgcArgv(env, argc, argv, &error)l;
    if(link == (MLINK)0 || error != MLEOK)
    { /* Unable to create link object */ }

    WSActivate(link);

    /* ... */

    apiResult = WSLogStreamToFile(link, "/path/to/logFile.log");
    if(! apiResult)
    { /* unable to log to logFile.log */ }

    /* ... */

    apiResult = WSDisableLoggingStream(link);
    if(! apiResult)
    { /* error while stopping logging to logFile.log */ }

    /* ... */

    apiResult = WSStopLoggingStream(link);
    { /* error while turning off logging */ }

    WSClose(link);

    WSDeinitialize(env);
}