Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate loggers (Serilog, NLog, log4net, ...) in Prism 8 based on Prism.Plugin.Logging #135

Open
lucacicognani opened this issue Dec 18, 2023 · 0 comments

Comments

@lucacicognani
Copy link

Hello, I'd like to use Serilog with Prism 8 in my WPF application. To do this I'm creating a plugin with my ISerilogLogger that inherit from IAggregableLogger for using with multiples loggers.
In my App.xaml.cs I resolve SerilogLogger concrete type and I add to AggregateLogger by AddLoggers method.
In my module get IAggregateLogger interface by constructor injection and I get my logger but I can only access to ILogger methods because I can't get my own ISerilogLogger (AddLoggers adds ILogger interface). So is this the right approach to integrate other loggers implementations in Prism 8? Can you provide an example to explain the right approach to use?

Thank you

Luca

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant