Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

Trace.SetWithTimes

Sets whether to include times in traces.

Component Version macOS Windows Linux Server iOS SDK
Trace 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "Trace.SetWithTimes"; Value )   More

Parameters

Parameter Description Example
Value The new setting. 1

Result

Returns OK or error.

Description

Sets whether to include times in traces.

Examples

Start log on desktop folder and include all calls with times:

Set Variable [ $FilePath ; Value: MBS( "Path.AddPathComponent"; MBS( "Folders.UserDesktop" ); "trace.txt" ) ]
Set Variable [ $a ; Value: MBS( "Trace.SetErrorsOnly"; 0 ) ]
Set Variable [ $b ; Value: MBS( "Trace.SetWithTimes"; 1 ) ]
Set Variable [ $c ; Value: MBS("Trace"; $FilePath) ]

Enable advanced logging to debug a problem with CURL:

# Trace to file with times
Set Variable [ $r; Value: MBS( "Trace"; "/tmp/mbs.log" )
Set Variable [ $r; Value: MBS( "Trace.SetWithTimes"; 1 )
#
# Debug log for CURL with additional data:
Set Variable [ $r; Value: MBS( "CURL.SetDebugWithTime"; $curl; 1 )
Set Variable [ $r; Value: MBS( "CURL.SetDebugWithProgress"; $curl; 1 )
#
# and define some timeouts
Set Variable [ $r; Value: MBS( "CURL.SetOptionConnectTimeoutMS"; $curl; 10000 )

See also

Release notes

Blog Entries

This function is free to use.

Created 16th July 2019, last changed 18th December 2021


Trace.SetServerLogPath - Trace.WriteLine