STrace Class

Definition

Contains methods that can be used to trace the execution of code in SQL Server.

public ref class STrace sealed
public sealed class STrace
type STrace = class
Public NotInheritable Class STrace
Inheritance
STrace

Remarks

Identified for informational purposes only. Not supported. Future compatibility is not guaranteed.

Properties

AutoFlush

Gets or sets a value indicating whether all messages will be automatically flushed.

Methods

Assert(Boolean)

Checks for a condition. If the condition is false, displays a message box that shows the call stack.

Assert(Boolean, String)

Checks for a condition. If the condition is false, this method sends a specified message and displays a message box that shows the call stack.

Enter()

Increases the indentation in the trace results when entering into a function.

Implies(Boolean, Boolean)

Causes an assertion if premise is true and conclusion is false.

Implies(Boolean, Boolean, String)

Causes an assertion if premise is true and conclusion is false and displays a message about the assertion.

Leave()

Decreases the indentation in the trace results when returning from a function.

LogExCatch(Exception)

Logs the fact that an exception was caught, together with the exception message and the stack trace.

LogExThrow()

Logs the fact that an exception was thrown, and includes the current stack trace.

Params(String, String, String, Object[])

Traces function parameters. Logs the input parameters of a function.

SetDefaultLevel(String, UInt32)

Sets the default trace level for the specified component.

Trace(String, String)

Traces with the default trace level for the component.

Trace(String, String, Object[])

Traces with the default trace level for the component, and logs the input parameters of the method.

Trace(String, UInt32, String)

Traces with the specified trace level.

Trace(String, UInt32, String, Object[])

Traces with the specified trace level for the component, and specifies the input parameters to format.

Applies to