Add a callback for receiving stderr output (#525)
* Add a callback for receiving stderr output * Add asserts to test
This commit is contained in:
parent
4e2c1b949f
commit
b9b4a23005
2 changed files with 35 additions and 0 deletions
|
|
@ -146,6 +146,8 @@ public sealed partial class StdioClientTransport : IClientTransport
|
|||
stderrRollingLog.Enqueue(data);
|
||||
}
|
||||
|
||||
_options.StandardErrorLines?.Invoke(data);
|
||||
|
||||
LogReadStderr(logger, endpointName, data);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -69,4 +69,9 @@ public sealed class StdioClientTransportOptions
|
|||
/// </para>
|
||||
/// </remarks>
|
||||
public TimeSpan ShutdownTimeout { get; set; } = TimeSpan.FromSeconds(5);
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a callback that is invoked for each line of stderr received from the server process.
|
||||
/// </summary>
|
||||
public Action<string>? StandardErrorLines { get; set; }
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue