LoggableStream
Ecng.Logging
Provides stream logging functionality by wrapping an underlying stream. It logs read and write operations using supplied formatting functions and log levels.
Hereda de: DumpableStream
Constructores
LoggableStream
public LoggableStream(Stream underlying, ILogReceiver logs, Func<byte[], string> formatRead, Func<byte[], string> formatWrite, LogLevels level)
loggableStream = LoggableStream(underlying, logs, formatRead, formatWrite, level)
Provides stream logging functionality by wrapping an underlying stream. It logs read and write operations using supplied formatting functions and log levels.
- underlying
- The underlying stream to wrap.
- logs
- The logging receiver used to output log messages.
- formatRead
- A function that formats the read data for logging.
- formatWrite
- A function that formats the written data for logging.
- level
- The log level of the log messages.
Métodos
Flush
public override void Flush()
loggableStream.Flush()
Clears all buffers and flushes both read and write data to the log.
FlushRead
public void FlushRead()
loggableStream.FlushRead()
Flushes the read data buffer to the log using the provided formatting function.
FlushWrite
public void FlushWrite()
loggableStream.FlushWrite()
Flushes the write data buffer to the log using the provided formatting function.