TraceFlags Property  
 

Gets and sets the network function logging flags.

Syntax

object.TraceFlags [= flags ]

Remarks

The TraceFlags property is used to specify the type of information written to the trace file when socket function tracing is enabled. The following values may be used:

Value Description
dnsTraceInfo All function calls are logged, but without detailed information about the data being transmitted. This is the most basic level of logging and can be useful when debugging call sequences or return values without the additional overhead of logging the data being exchanged between the client and server.
dnsTraceError Only those function calls which fail are written to the file. It is important to note that this only relates to errors at the networking level and not errors which can occur at the protocol level, such as an error response from the server because the client sends an invalid request.
dnsTraceWarning Only those function calls which fail or return values which indicate a warning are written to the file. Warnings consist of error conditions which do not normally constitute a failure at the network level. The most common warning that can occur is a timeout while waiting for a response from the remote host.
dnsTraceHexDump In addition to logging function calls, this option writes the raw data that is sent and received over the network, shown in both hexadecimal and ASCII formats. This is especially useful for debugging protocol-level issues and verifying payload contents and responses.
dnsTraceTruncate If the file already exists and is not read-only, the contents will be deleted before logging begins. This option is typically used to begin a new log file each time tracing is enabled, rather than appending to an existing file. This option requires the process to have permission to read, write and delete the file in the specified folder.

Since logging is enabled per-process, the trace flags are shared by all instances of the control being used. If multiple controls have tracing enabled, the TraceFlags property should be set to the same value for each control. Changing the trace flags for any one instance of the control will affect the logging performed for all other instances used by the application.

Warnings are generated when a non-fatal error is returned by a Windows Sockets function. For example, if data is being written through the control and an error indicating that the operation would block is returned, only a warning is logged since the application simply needs to attempt to write the data at a later time.

Data Type

Integer (Int32)

See Also

Trace Property, TraceFile Property