Table of Contents

Class FileLogHandler

Namespace
OpenQA.Selenium.Internal.Logging
Assembly
WebDriver.dll

Represents a log handler that writes log events to a file.

public class FileLogHandler : ILogHandler, IDisposable
Inheritance
FileLogHandler
Implements
Inherited Members

Constructors

FileLogHandler(string)

Initializes a new instance of the FileLogHandler class with the specified file path.

public FileLogHandler(string filePath)

Parameters

filePath string

The path of the log file.

Exceptions

ArgumentException

If filePath is null or Empty.

FileLogHandler(string, bool)

Initializes a new instance of the FileLogHandler class with the specified file path.

public FileLogHandler(string filePath, bool overwrite)

Parameters

filePath string

The path of the log file.

overwrite bool

Specifies whether the file should be overwritten if it exists on the disk.

Exceptions

ArgumentException

If filePath is null or Empty.

Methods

Dispose()

Disposes the file log handler and releases any resources used.

public void Dispose()

Dispose(bool)

Disposes the file log handler and releases any resources used.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

A flag indicating whether to dispose managed resources.

~FileLogHandler()

Finalizes the file log handler instance.

protected ~FileLogHandler()

Handle(LogEvent)

Handles a log event by writing it to the log file.

public void Handle(LogEvent logEvent)

Parameters

logEvent LogEvent

The log event to handle.