Skip to content

Added Documentation and Unit Tests for HTTP Requests Logging - #78

Merged
Burgyn merged 6 commits into
Kros-sk:masterfrom
mchlkntrv:feature/requests-logging
Dec 16, 2025
Merged

Added Documentation and Unit Tests for HTTP Requests Logging#78
Burgyn merged 6 commits into
Kros-sk:masterfrom
mchlkntrv:feature/requests-logging

Conversation

@mchlkntrv

Copy link
Copy Markdown
Contributor

This PR adds documentation and unit tests for the last implemented feature of structured HTTP requests logging, along with some other small code fixes.

Documentation updates:

  • Added and updated documentation for the new --requests-log-file option, describing its usage and example JSON content.
  • Updated the table of contents to include the new HTTP Requests Logging page.

Feature implementation:

  • Refactored requests logging configuration and application builder logic to use empty strings instead of nullable types for the requests log file path (to match the existing implementation of log file path resolving ).
  • Improved the RequestLogFileEntry model to always provide EndTime and DurationMs as non-null values, since they should never be null.

Testing:

  • Added a new test class RequestsLoggingHandlerShould to verify that HTTP requests logging works correctly, including cases for successful requests, failures, missing context, and multiple consecutive requests.

[Theory]
[InlineData(false)]
[InlineData(true)]
public async Task LogRequestLogEntry(bool shouldFail)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neviem či to takto spájať do jedného testu.
Lebo napríklad by som očakával, že pri testovaní tej exception aj overíme status kód, ...

@Burgyn
Burgyn merged commit 359a0a5 into Kros-sk:master Dec 16, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants