| Command group | Flag affected | Reversible | Execute on client | Platform(s) |
| Debugger | NO | NO | YES | All |
| Diagnostic message | If specified,the message will only be added to the trace log,if the trace log has been set to log diagnostic messages |
| Always log | If specified,always log the message even if $nodebug is true for the library or the local debugger is disabled (this option is ignored for a diagnostic message) |
| Start diagnostic logging | If specified,the command switches on the Log Diagnostic Messages trace log option,before logging the message if the other command options allow.Also,if specified with an empty message to log,the command does not log an empty line |
| Stop diagnostic logging | If specified,the command switches off the Log Diagnostic Messages trace log option,after logging the message if the other command options allow.Also,if specified with an empty message to log,the command does not log an empty line |
This command sends a specified line of text to the trace log. The text can contain square bracket notation. You can use text styles (generated using the style() function inside square brackets) to (for example) apply colors to sections of the logged text when it is displayed in the trace log panel in the browser or the trace log window; such styles are stripped when writing the trace log line to the text log file in the logs folder. The trace log renders the text styles if the entry traceLogUsesStyles in the defaults section of config.json is set to true. Note that if you use styles other than kEscColor and kEscStyle, these styles are ignored when copying selected trace log lines to the clipboard as HTML.
Note - for JavaScript client-executed methods this command sends the text to the JavaScript console (provided it is available). In this case, text styles are not supported.
# send messages to the trace log
Open trace log(Clear trace log)Send to trace logCurrent task is [$ctask().$name]Send to trace logCurrent class is [$cclass().$name]
ForlCountfrom1to10step1Send to trace logValue lCount is [lCount]
End ForSend to trace logEnd of For Loop