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 7696931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:53:42+00:00 2026-05-31T21:53:42+00:00

I am running NServiceBus and having this issue . To try and troubleshoot it

  • 0

I am running NServiceBus and having this issue. To try and troubleshoot it I would like to make NServiceBus log to a file.

The problem is that I am hosting NServiceBus in IIS, not NServiceBus.Host.exe. Because of that I don’t know a way to turn on the the production profile.

Is there a way to tell NServiceBus to log to a file not using profiles? (Or a way to set the profile when not using NServiceBus.Host.exe?)

I had hoped that there is a way change NServiceBus.Configure.With().Log4Net(); to put an Appender in that will log to a file. But I don’t see anyway to do that in code (all the examples use xml).

Alternatly if there is a way to change this to log to a file that would be great too:

<configSections>
  <section name="Logging" type="NServiceBus.Config.Logging, NServiceBus.Core" />
</configSections>

<Logging Threshold="FINE" />

Does anyone know how to do either of these things?

  • 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-31T21:53:43+00:00Added an answer on May 31, 2026 at 9:53 pm

    Implement IWantCustomLogging:

    https://github.com/NServiceBus/NServiceBus/blob/master/Samples/GenericHost/LoggingFromAppConfig/EndpointConfig.cs

    And specify the RollingFileAppender in code:

    Configure.Log4net< RollingFileAppender>(...)

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

Sidebar

Related Questions

Running into a problem where on certain servers we get an error that the
I've been having endless woes trying to deploy an NServiceBus application that I had
Running the code bellow, I'm getting this error: Traceback (most recent call last): File
We have an NServiceBus 3.0 publisher running under the production profile. When a subscriber
Running my script through Devel::NYTProf showed that the following portion of code took up
Running this program is printing forked! 7 times. Can someone explain how forked! is
Running SQL Server 2008 (not R2). I have a few reports that have URLs
I recently received a PC running Windows 7 for future development as this will
I'm looking for a pub/sub mechanism that can be used by .NET applications running
Running this code: class A { public int x; public A() { function(); }

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.