StartFileLogging
The StartFileLogging service tells the EMS to begin writing log messages to a file. The EMS generates log messages at the level defined by a call to this service.
Inputs
You pass in TW_INFOTABLE that has one row and two columns. The row object must contain the following parameters:
The level of the log messages to write to a file. Choose among the following levels: TRACE, DEBUG, WARN, INFO, or AUDIT, where TRACE provides the most information.
directory, which specifies the path to the file on the computer where the EMS is running. Use the following format: /twx/wsems/logfiles/directory.
* 
The TRACE level is useful when testing and troubleshooting. It provides both the operational and functional log messages for an EMS.
Outputs
This service returns an HTTP response only. If the operation was successful, it returns HTTP 200. Otherwise, it returns an HTTP error.
Here is an example of a REST call that tells an EMS to start logging messages that it generates to a file, with the log level set to TRACE:

http://localhost:8000/Thingworx/Things/LocalEms/Services/StartFileLogging
{
"level": "TRACE",
"directory": "./ws_ems/logfiles"
}
Was this helpful?