I have problem with IRequestPreProcessor pipeline #1006
Unanswered
shirin-monzavi
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I don't think you can get specifically the handler type. There's not really an easy way with generics to know the exact handler type resolved by the container. The best you can do is do something like Otherwise you'll have to inject the original handler, then use some kind of logger factory to create a logger provider based on the handler getting injected. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I have two problems.
Firstly,
I need to write log and my logger is specific for us.
private readonly ILoggerProvider<GetBalanceQueryHandler> _logger;
GetBalanceQueryHandler is type of the handler and i want to use IRequestPreProcessor.
when i inject ILoggerProvider I cannot get the type of handler.
Note: GetBalanceQueryHandler is a sample and for every scenario is different.
Secondly,
I want to write some log for specific handlers how could i deal with?
I will look forward hearing you.
I really appreciate you in advance.
Beta Was this translation helpful? Give feedback.
All reactions