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

  • Home
  • SEARCH
  • 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 7090799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:06:04+00:00 2026-05-28T08:06:04+00:00

I created my own ILogger implementation and register an instance via ResourceSpace.Uses.Resolver.AddDependencyInstance<ILogger>(…) inside the

  • 0

I created my own ILogger implementation and register an instance via

ResourceSpace.Uses.Resolver.AddDependencyInstance<ILogger>(...)

inside the

using (OpenRastaConfiguration.Manual)

block.

This works fine for most log messages, however some classes in OpenRasta try to figure out their ILogger instance before the DI is ready, like HostManager:

static HostManager()
{
    Log = DependencyManager.IsAvailable
        ? DependencyManager.GetService<ILogger>()
        : new TraceSourceLogger();
}

In my case (and I suspect the general case), IsAvailable is false, so it defaults to TraceSourceLogger.

As static ILogger HostManager.Log is not a public property, I hacked it and made it public so that I can now set it.

When it comes to InternalDependencyResolver, which is always initialized to new TraceSourceLogger() on object construction, it does have a publicly settable ILogger Log property, so I could just use that.

Now all of OpenRasta’s log messages that I’ve encountered so far go to my custom ILogger.

Does anyone know of a way to get all of OpenRasta’s classes (I did not check systematically and might have missed a class or two) to log to a custom ILogger without having to hack the sources? (It’s always nice to know that upgrading OpenRasta won’t require repatching and rebuilding)

  • 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-28T08:06:04+00:00Added an answer on May 28, 2026 at 8:06 am

    as you found out, it’s an ordering issue. Happy to take a patch to fix that though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created my own Tree implementation for various reasons and have come up
I've created my own signup form and creating the user using the Membership class.
I've created my own little c# compiler using the tutorial on MSDN, and it's
I created my own toolbar. Inside toolbar I have collection property to display custom
I created my own color theme using this website . I've added a new
I have already created my own VOIP server and client using pure sockets. All
I have an MVC3 application using NHibernate. I've created my own membership and role
I created my own ruby console using IronRuby engine, but I can't get to_yaml
I created my own parental control app using C# to monitor my kids activity.
I created my own music player that runs on iPhone using the class MPMusicPlayerController

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.