-
Hi, How can we use the Powertools logging without static references, only by registering its logger provider and using the Microsoft.Extensions.Logging abstractions? I've tried the following code but I'm not sure if the configuration setup is taken into account or not: using AWS.Lambda.Powertools.Logging.Internal;
...
builder.Logging.ClearProviders();
builder.Logging.AddProvider(new LoggerProvider(null)); |
Beta Was this translation helpful? Give feedback.
Answered by
hjgraca
Jan 30, 2024
Replies: 1 comment
-
Hi @akhansari , First of all, thanks for using Powertools! It is not documented but there is a way you can use ILoggingBuilder, ServiceCollection and Dependency Injection with Powertools logger. Hope this helps. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
akhansari
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @akhansari ,
First of all, thanks for using Powertools!
It is not documented but there is a way you can use ILoggingBuilder, ServiceCollection and Dependency Injection with Powertools logger.
Have a look at this gist
Hope this helps.