Function logZToStream

  • Creates a log recorder that writes messages to output stream.

    Logs messages as is when the stream is in [object mode], or formats them otherwise.

    Reports logging complete immediately if to.write() returned true. Awaits for stream to [drain] otherwise.

    Ends underlying stream(s) on .end() method call.

    Parameters

    • to: Writable

      Writable stream to log messages to.

    • spec: StreamZLogSpec = {}

      A specification of how to log messages to Node.js stream.

    Returns ZLogRecorder

    New log recorder.

Generated using TypeDoc