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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:46:18+00:00 2026-06-02T23:46:18+00:00

This ends up boiling down to the simple question of why does Console.WriteLine(asdfasdf) not

  • 0

This ends up boiling down to the simple question of why does Console.WriteLine(“asdfasdf”) not get output to the output window in Visual Studio 2010??? as mine is not being output there when running tests.

I have a log configuration file that when I run my program in debug mode logs to file AND logs to the VS output window both. This same file when I use it with MS Test logs to the file I specify which ends up as TestResults/xxxx/example.log BUT does not log to the VS output pane. Why is that? This is very very annoying as I like to use the output to scroll through the logs.

My config in the log4net which works in one and not the other

 <log4net>
    <!-- A1 is set to be a ConsoleAppender -->
    <appender name="Console" type="log4net.Appender.ConsoleAppender">

        <!-- A1 uses PatternLayout -->
        <layout type="log4net.Layout.PatternLayout">
            <conversionPattern value="%-4timestamp [%thread] %-5level %logger %ndc - %message%newline" />
        </layout>
    </appender>

  <appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
    <file value="example.log" />
    <appendToFile value="true" />
    <maximumFileSize value="100KB" />
    <maxSizeRollBackups value="2" />

    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%level %thread %logger - %message%newline" />
    </layout>
  </appender>

  <root>
    <level value="DEBUG" />
    <appender-ref ref="Console" />
    <appender-ref ref="RollingFile" />
  </root>

</log4net>

I call this in my test case

        // Set up a simple configuration that logs on the console.
        //BasicConfigurator.Configure();
        XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo("log4net.config"));
        Log.Info("testing");

I call this in my program because it is actually moved into bin\Debug\conf dir….

        XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo("conf/log4net.config"));

        log.Info("Starting the toolbar application");

It makes absolutely no sense to me as to why this would not work?
thanks,
Dean

  • 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-06-02T23:46:19+00:00Added an answer on June 2, 2026 at 11:46 pm

    I don’t think the output pane actually reflects console output. Instead, in the “Test Results” pane, right click the test question and select “View Test Results Details” from the context menu. The results details for each test contains the console output for that test.

    Also, thanks, I was having the opposite problem–I couldn’t find the file, but I was looking in bin/Debug!

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

Sidebar

Related Questions

This somehow simple task is not so simple. I can get the number of
This question kind of starts where this question ends up. MATLAB has a powerful
Apologies if this ends up being a stupid question, but I was just wondering
This is the thumnbail script I'm working on and it ends up creating a
I'm trying to center my UILabel horizontally. This is what it ends up looking
This should be simple, but the answer is eluding me. If I've got a
This is probably a stupid question, but how much of a security risk is
I use this regex on some input, [^a-zA-Z0-9@#] However this ends up removing lots
This is sort of the next step of the LINQ to DB2 question I
Please do add a comment if more information is needed to answer this question.

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.