Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logging facility #5

Closed
tintoy opened this issue Feb 26, 2018 · 1 comment
Closed

Add logging facility #5

tintoy opened this issue Feb 26, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@tintoy
Copy link
Owner

tintoy commented Feb 26, 2018

Create a DelegatingHandler that logs requests and responses (only added to the pipeline when an ILogger is supplied).

To implement this, we'll need to add support for specifying one or more DelegatingHandlers when creating a KubeApiClient.

Consider adding to KubeClientOptions?

public class KubeClientOptions
{
    /// <summary>
    ///     Factories for message handlers (if any) to be added to the HTTP request pipeline.
    /// </summary>
    public List<Func<DelegatingHandler>> MessageHandlers { get; } = new List<Func<DelegatingHandler>();
}

We can then implement an AddLogging extension method for KubeClientOptions which adds the required handler.

@tintoy tintoy added enhancement New feature or request help wanted Extra attention is needed labels Feb 26, 2018
@tintoy tintoy removed the help wanted Extra attention is needed label Mar 10, 2018
@tintoy
Copy link
Owner Author

tintoy commented Mar 10, 2018

Implemented.

@tintoy tintoy closed this as completed Mar 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant