Using Diagnostic Trace Services
When using the enableDiagnosticTrace() and disableDiagnosticTrace() script services for logging purposes, the services must be used in a wrapper service for the service that is being diagnosed.
In the example below, the MyService service for Thing1 is wrapped.
// enableDiagnosticTrace():BOOLEAN
var state = enableDiagnosticTrace();
// result: BOOLEAN
result = Things["Thing1"].MyService();
// disableDiagnosticTrace():BOOLEAN
var state = disableDiagnosticTrace();