Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7413293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:40:23+00:00 2026-05-29T06:40:23+00:00

Using WPF/PRISM I want to log my messages through ILoggerFacade to my GUI (A

  • 0

Using WPF/PRISM I want to log my messages through ILoggerFacade to my GUI (A statusbar and a logging window). The problem is that the CreateLogger() function gets called so early in the bootstrapping process, that I cant resolve a IEventAggregator.

What’s the correct way of logging to GUI with the all available ILoggerFacade?

Thanks,
Mathieu

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T06:40:24+00:00Added an answer on May 29, 2026 at 6:40 am

    The shell is created very late in the bootstrapping process, so there won’t even be a window to show the initial log messages coming from the bootstrapper.

    If you want to log any later messages to the GUI, you can override the ConfigureContainer method and do something like this

    protected override void ConfigureContainer()
    {
        base.ConfigureContainer();
    
        ((MyLoggerAdapter)this.Logger).EventAggregator =
            Container.Resolve<IEventAggregator>();
    }
    

    where MyLoggerAdapter is the type of the logger you’ve created in your CreateLogger override.
    Then in your implementation of MyLoggerAdapter you can have

    public void Log(string message, Category category, Priority priority)
    {
        if (EventAggregator != null)
        {
            // Perform logging that requires EventAggregator.
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Prism with WPF, I want to allow users to select from a repository
We have the beginnings of a modular wpf application built using prism. We want
I start using WPF with PRISM and MVVM. One problem I am facing is
Using vanilla WPF (no MVVM framework like Prism). Let me say up front that
I have a WPF application that is written using MVVM Prism. It has a
We were building out the next version of an in-house thick-client application using WPF/Prism
I am working on a wpf application using PRISM. This is my first ever
We are using the prism and WPF to build application. Recently we started using
Using Prism - what is the best way to handle navigation in a WPF
I have a WPF Desktop application using Prism 4, in my bootstrapper i have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.