Skip to main content

GeneralTracer

GeneralTracer

Namespace: GeneralUpdate.Common.Shared

Assembly: GeneralUpdate.Common.dll

GeneralUpdate.Common is a common component that provides core underlying code. It generally does not need to be referenced manually and will be imported automatically when you reference GeneralUpdate.ClientCore or GeneralUpdate.Core.

public static class GeneralTracer

Example

This mechanism is enabled by default. It outputs the component's internal exception information and partial execution flow information, which can be viewed and analyzed simultaneously via the IDE console, log files, and Dbgview debugging tool.

// Disable the Trace mechanism in production environments or when it is not needed; it is enabled by default.
GeneralTracer.SetTracingEnabled(false);

// Call this method before the bootstrap class.
_ = await new GeneralClientBootstrap()
.LaunchAsync();

IDE Console

Log File

This file is generated by default in the Logs folder under the running directory, with the naming format: generalupdate-trace [today].log. This log does not depend on third-party components.

Dbgview Debugging Tool

Application to

ProductVersions
.NET5, 6, 7, 8, 9, 10
.NET Framework4.6.1
.NET Standard2.0
.NET Core2.0