Skip to content

[C#] Avoid logger instantiations per request #40553

@AliKhalili

Description

@AliKhalili

Describe the enhancement requested

In .NET, the method CreateLogger<T>(src) yields an instance of ILogger<T> and consistently generates a fresh Logger<T> object. On the other hand, invoking CreateLogger(typeof(T))(src) results in a non-generic ILogger instance and defers to the factory's CreateLogger method, usually without creating a new instance.

It would be beneficial to modify this behavior within the FlightSqlServer base class to prevent the allocation of a new logger with each request.

Component(s)

C#

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions