Skip to content

[Bug] Logs are created even if logging is disabled #3901

@pmaytak

Description

@pmaytak

Issue
See AuthenticationRequestParameters. The log string is created even if the specific log level is disabled. This method is also called on every request. Other parameter classes have the same behavior; and there may be other cases. Usually users use log level Warning, so logs are generated which are not used.

Solution
Go over any logger calls where we call Log (especially the perf sensitive areas) and wrap log creation into a conditional to check if the log level is enabled (if (logger.IsLoggingEnabled(LogLevel.X))). Verify the results with perf tests.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions