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

Implement logging #8

Open
Teknikaali opened this issue Nov 24, 2019 · 0 comments
Open

Implement logging #8

Teknikaali opened this issue Nov 24, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Teknikaali
Copy link
Owner

Teknikaali commented Nov 24, 2019

Currently PostComment function returns exception messages to user. This can leak some unnecessary internal workings of the function to the user. This should be only used locally for debugging and otherwise rely on logging. So:

Returning error message and exceptions should be replaced with logging.

See this for reference:
Write logs in C# functions

@Teknikaali Teknikaali added the enhancement New feature or request label Nov 24, 2019
@Teknikaali Teknikaali self-assigned this Nov 24, 2019
@Teknikaali Teknikaali changed the title Implement structured logging Implement logging Nov 24, 2019
Teknikaali added a commit that referenced this issue Feb 3, 2020
Issue: #8

Replaces exception handling by either returning a result (Ok, Redirect or BadRequest) or logging the possible exception.
Refactor to simplify the PostComment function.
Change Azure Function's return type to Task<IActionResult> to make testing possible.
Replace NameValueCollection with IFormCollection for easier testing.
Teknikaali added a commit that referenced this issue Feb 9, 2020
Issue: #8

No need for NRE, because the current parameterinfo (constructor parameter) doesn't represent a return value. See ParameterInfo.Name property documentation for more.
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