Table of Contents

Class FileTextLogWriter

Namespace
Backdash.Core
Assembly
Backdash.dll

Implementation of ILogWriter for logging into a file.

public sealed class FileTextLogWriter : TextLogWriter, ILogWriter, IDisposable
Inheritance
FileTextLogWriter
Implements
Inherited Members

Constructors

FileTextLogWriter(string?, bool)

Initializes a new instance of the FileTextLogWriter class.

public FileTextLogWriter(string? filename = null, bool append = true)

Parameters

filename string

Log file name you can use placeholders for: - ProcessId: "{{proc_id}}"; - UtcNow: "{{timestamp}}"; Defaults to "{{proc_id}}_{{timestamp}}.log"

append bool

true to append data to the file; false to overwrite the file. If the specified file does not exist, this parameter has no effect, and the constructor creates a new file.

Properties

textWriter

Current TextWriter

protected override TextWriter textWriter { get; }

Property Value

TextWriter