Skip to content

IConsoleLogService

Contract for a multi-log logging façade that registers named/typed log files and routes writes and exceptions to them. No implementation ships in this library. (BR-091, BR-094)*

Purpose

  • Contract for a multi-log logging façade that registers named/typed log files and routes writes and exceptions to them. 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
GetLog(string logId) ILogWriter GetLog(string logId) Looks up a registered writer by its string id. (BR-091)
GetLog(LogType logType) ILogWriter GetLog(LogType logType) Looks up a registered writer by its fixed LogType slot. (BR-092)
Logs IEnumerable<ILogWriter> Logs { get; } Enumerates every writer currently registered with the service.
LogException(Exception exception) void LogException(Exception exception) Records an exception to the service's error output.
RegisterLogFile(string logId, string filePath) void RegisterLogFile(string logId, string filePath) Associates a string id with a target file path, creating the underlying writer. (BR-091)
Flush() void Flush() Flushes all registered writers.
Flush(string logId) void Flush(string logId) Flushes the writer registered under logId.
Flush(LogType logType) void Flush(LogType logType) Flushes the writer registered under the given LogType.
Write(string message) void Write(string message) Writes to the service's default output destination.
WriteError(string message) void WriteError(string message) Writes to the service's error destination.
WriteToAppLog(string message, string logId, bool line = true) void WriteToAppLog(string message, string logId, bool line = true) Writes message to the writer identified by logId, appending a line break by default. (BR-093)
WriteToAppLog(string message, LogType logType, bool line = false) void WriteToAppLog(string message, LogType logType, bool line = false) Writes message to the writer identified by logType, not appending a line break by default. (BR-093)

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/IConsoleLogService.cs