Skip to content

[Breaking change]: Http logging in dotnet 8 doesn't work without call AddHttpLogging #60886

Open
@denisbredikhin

Description

@denisbredikhin

Description

There is an behavioral breaking change in .NET 8: Http logging doesn't work without call AddHttpLogging.
It was discussed here: #51322
Main documentation has been updated, but this change is not mentioned in the "Breaking changes in .NET 8" article.

Version

.NET 8

Previous behavior

It was enough to call app.UseHttpLogging(); to have HTTP logging activated.

New behavior

You need to call services.AddHttpLogging() too, otherwise your service crashes.

Type of breaking change

  • Binary incompatible: Existing binaries might encounter a breaking change in behavior, such as failure to load or execute, and if so, require recompilation.
  • Source incompatible: When recompiled using the new SDK or component or to target the new runtime, existing source code might require source changes to compile successfully.
  • Behavioral change: Existing binaries might behave differently at run time.

Reason for change

#50163

Recommended action

Please update "Breaking changes in .NET 8" article.

Feature area

ASP.NET Core

Affected APIs

No response


Associated WorkItem - 370661

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsbreaking-changeThis issue / pr will introduce a breaking change, when resolved / merged.

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions