Represents the destination of logged messages from LoggingChannel instances.
Public NotInheritable Class LoggingSession Implements ILoggingSession, _ IDisposable
The LoggingSession class has these types of members:
The LoggingSession class has these constructors.
|LoggingSession||Initializes a new instance of the LoggingSession class.|
The LoggingSession class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.
|AddLoggingChannel(ILoggingChannel)||Adds a logging channel to the current logging session.|
|AddLoggingChannel(ILoggingChannel, LoggingLevel)||Adds a logging channel with the specified logging level to the current logging session.|
|Dispose [C#, VB]||Performs tasks associated with freeing, releasing, or resetting unmanaged resources.|
|RemoveLoggingChannel||Removes the specified logging channel from the current logging session.|
|SaveToFileAsync||Saves the current logging session to a file.|
The LoggingSession class has these properties.
|Read-only||Gets the name of the logging session.|
Use the LoggingSession class to log messages and data to an in-memory circular buffer as your app runs. Use the SaveToFileAsync method to save the buffer to a file. You can view the log files by using the Windows Performance Toolkit (WPT) and other utilities like tracerpt.exe.
LoggingSession instances keep logged messages in memory until the SaveToFileAsync method is called. This enables on-demand saving of events until the app saves the in-memory messages.
Add LoggingChannel instances to a LoggingSession, and call LoggingSession instance methods to remove channels, dispose, and perform other operations.
Minimum supported client
|Windows 8.1 [Windows Store apps only]|
Minimum supported server
|Windows Server 2012 R2 [Windows Store apps only]|