Skip to content

RequestLocalizationMiddleware logs at warning #4504

Closed
@daniel-white

Description

@daniel-white

Describe the bug

When the RequestLocalizationMiddleware detects an unsupported language, it logs at the warning level.

To Reproduce

Steps to reproduce the behavior:

  1. Using this version of ASP.NET Core 2.1
  2. Setup the localization as documented.
  3. Set the culture/uiculture values to something that isn't added supported collections.
  4. Observe warning error messages. See: RequestCultureProviderLoggerExtensions.cs

Expected behavior

This seems a bit severe given that this value is passed by the client, for instance if Spanish is requested but only French is specified, every requests gets 1 or more warnings.
Perhaps make this configurable and/or reduce it to a debug level.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DoneThis issue has been fixedarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesbugThis issue describes a behavior which is not expected - a bug.help wantedUp for grabs. We would accept a PR to help resolve this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions