TextWriterEventListener Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Event listener that writes logs to a file or a fileStream provided by user.
public class TextWriterEventListener : System.Diagnostics.Tracing.EventListener
type TextWriterEventListener = class
inherit EventListener
Public Class TextWriterEventListener
Inherits EventListener
- Inheritance
-
TextWriterEventListener
Constructors
TextWriterEventListener() |
Initializes a new instance of TextWriterEventListener that writes logs to text file. |
TextWriterEventListener(StreamWriter) |
Initializes a new instance of TextWriterEventListener that writes logs to text file. |
TextWriterEventListener(String) |
Initializes a new instance of TextWriterEventListener that writes logs to text file. |
Fields
DefaultLogFileName |
Name of the default log file, excluding its path. |
Methods
Dispose() |
Releases all resources used by the current instance of the TextWriterEventListener class. |
OnEventWritten(EventWrittenEventArgs) |
Called whenever an event has been written by an event source for which the event listener has enabled events. |
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for