Skip to content

ILogWriter

Contract for a single log destination (one file), covering timestamp formatting and buffered writes. No implementation ships in this library. (BR-091, BR-094)*

Purpose

  • Contract for a single log destination (one file), covering timestamp formatting and buffered writes. No implementation ships in this library. (BR-091, BR-094)*

Context

  • Namespace: SAIF.Common.Interfaces
  • Assembly/package: SAIF.Framework.Common

Public members

Member Signature Purpose
LogId string LogId { get; } The identifier this writer was registered under.
FilePath string FilePath { get; } The file path this writer targets.
LogType LogType LogType { get; } The fixed log slot this writer corresponds to, if any.
SetTimeFormat(string format) void SetTimeFormat(string format) Configures the timestamp format used by WriteTimedLine.
SetTimeDelimiter(string delimiter) void SetTimeDelimiter(string delimiter) Configures the delimiter placed between a rendered timestamp and the message.
SetWriteLinePrefix(string prefix) void SetWriteLinePrefix(string prefix) Configures a fixed prefix prepended to each written line.
Flush() void Flush() Flushes any buffered output for this writer to its underlying stream.
Write(string message) void Write(string message) Writes a message with no trailing line break.
WriteLine(string message) void WriteLine(string message) Writes a message followed by a line break.
WriteTimedLine(string message) void WriteTimedLine(string message) Writes a message prefixed with a formatted timestamp, followed by a line break.
GetUnderlyingStream() Stream GetUnderlyingStream() Exposes the raw stream backing this writer for advanced scenarios.

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • Common/SAIF.Common/Interfaces/ILogWriter.cs