WSDisableLoggingStream (C Function)
int WSDisableLoggingStream( WSLINK l )
disables logging of the stream contents for the WSTP connection specified by l.
Details
- 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.
Examples
Basic Examples (1)
#include "wstp.h"
int main(int argc, char **argv)
{
WSENV env;
WSLINK link;
int error;
int apiResult;
env = WSInitialize((WSEnvironmentParameter)0);
if(env == (WSENV)0)
{ /* Unable to create WSTP environment object */ }
link = WSOpenArgcArgv(env, argc, argv, &error)l;
if(link == (WSLINK)0 || error != WSEOK)
{ /* 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);
}