OpenTAP 9.24
API Reference
Public Member Functions | Public Attributes | Properties | List of all members
OpenTap.FileTraceListener Class Reference

TraceListener to be used in the App.Config file of the executable to write trace/log data to a file. More...

Inheritance diagram for OpenTap.FileTraceListener:
OpenTap.TextWriterTraceListener OpenTap.TraceListener OpenTap.Diagnostic.ILogListener

Public Member Functions

 FileTraceListener (string fileName)
 Initializes a new instance of the FileTraceListener class. More...
 
 FileTraceListener (Stream stream)
 Initializes a new instance of the OpenTap.FileTraceListener class, using the stream as the recipient of the debugging and tracing output. More...
 
override void TraceEvents (IEnumerable< Event > events)
 Receives all log messages. The virtual method simply calls TraceEvent(string, LogEventType, int, string) directly.

 
- Public Member Functions inherited from OpenTap.TextWriterTraceListener
 TextWriterTraceListener (string filename)
 Creates a new TextWriterTraceListener writing to the given filename.
 
 TextWriterTraceListener (Stream stream)
 Creates a new TextWriterTraceListener writing to the given stream.
 
override void Write (string message)
 Writes a string to the current Writer.
 
override void WriteLine (string message)
 Writes a string including a newline to the current Writer.
 
override void Flush ()
 Flushes the log system and the current Writer.
 
void Dispose ()
 Frees up the writer.
 
- Public Member Functions inherited from OpenTap.TraceListener
virtual void TraceEvent (string source, LogEventType eventType, int id, string format)
 Empty TraceEvent method.
 
virtual void TraceEvent (string source, LogEventType eventType, int id, string format, params object[] args)
 Empty TraceEvent method.
 

Public Attributes

ulong FileSizeLimit = ulong.MaxValue
 Installs a file limit. When the limit is reached FileSIzeLimitReached is invoked.
 

Properties

bool IsRelative [getset]
 If the log should be written with absolute or relative time.
 
string FileName [get]
 The current file name of the trace file.
 
- Properties inherited from OpenTap.TextWriterTraceListener
TextWriter Writer [getset]
 The writer that is used as the output.
 

Detailed Description

TraceListener to be used in the App.Config file of the executable to write trace/log data to a file.

Constructor & Destructor Documentation

◆ FileTraceListener() [1/2]

OpenTap.FileTraceListener.FileTraceListener ( string  fileName)
inline

Initializes a new instance of the FileTraceListener class.

Parameters
fileNameName of the file to write to.

◆ FileTraceListener() [2/2]

OpenTap.FileTraceListener.FileTraceListener ( Stream  stream)
inline

Initializes a new instance of the OpenTap.FileTraceListener class, using the stream as the recipient of the debugging and tracing output.

Parameters
streamA System.IO.Stream that represents the stream the System.Diagnostics.TextWriterTraceListener writes to.

OpenTAP 9.24 API built Tue Apr 30 2024 13:44:41