where does console output go?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=

    where does console output go?

    Hi;

    When my ASP.NET app is running on IIS, where does the
    Console.Out.Wri teLine("hi there"); output go?

    --
    thanks - dave
    david_at_windwa rd_dot_net
    Windward's document generation software provides a unique low-code solution that enables users to design custom, data-connected templates within the familiar landscape of Microsoft Office. Windward is fast, easy, and removes human error, transforming the way business professionals create documents.


    Cubicle Wars - http://www.windwardreports.com/film.htm


  • Hans Kesting

    #2
    Re: where does console output go?

    Hi;
    >
    When my ASP.NET app is running on IIS, where does the
    Console.Out.Wri teLine("hi there"); output go?
    >
    I don't think it goes anywhere. It definitely doesn't go to the client, as
    this
    runs on the server. But that server process doesn't have any console to write
    to,
    so this output is ignored.

    If you want to write logging, try log4net http://logging.apache.org/log4net/

    Hans Kesting


    Comment

    • Steven Cheng[MSFT]

      #3
      Re: where does console output go?

      Hello Dave,

      As for the Console, each win32 process has a standard console output, input
      and err, you can write data to output. In console application, the console
      output is directly displayed. For winform or asp.net application, it is not
      displayed, there does have means to redirect console in .NET:

      #Redirect I/O to a TextBoxWriter in .NET


      However, for ASP.NET application, I think you may consider other means
      according to your actual scenario. Are you wantting to write out some debug
      or trace data? If so the System.Diagnost ics namespace contains classes that
      help perform debug and trace or logging.

      Sincerely,

      Steven Cheng

      Microsoft MSDN Online Support Lead



      =============== =============== =============== =====

      Get notification to my posts through email? Please refer to
      Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.

      ications.



      Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
      where an initial response from the community or a Microsoft Support
      Engineer within 1 business day is acceptable. Please note that each follow
      up response may take approximately 2 business days as the support
      professional working with you may need further investigation to reach the
      most efficient resolution. The offering is not appropriate for situations
      that require urgent, real-time or phone-based interactions or complex
      project analysis and dump analysis issues. Issues of this nature are best
      handled working with a dedicated Microsoft Support Engineer by contacting
      Microsoft Customer Support Services (CSS) at
      http://msdn.microsoft.com/subscripti...t/default.aspx.

      =============== =============== =============== =====



      This posting is provided "AS IS" with no warranties, and confers no rights.

      Comment

      • =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=

        #4
        Re: where does console output go?

        I was wondering if IIS had a feature like the java app servers where they
        write the console and error output to a file on the server. It's a useful
        feature at times. Based on the replies I am guessing it does not have this.
        (We do use log4net.)

        --
        thanks - dave
        david_at_windwa rd_dot_net
        Windward's document generation software provides a unique low-code solution that enables users to design custom, data-connected templates within the familiar landscape of Microsoft Office. Windward is fast, easy, and removes human error, transforming the way business professionals create documents.


        Cubicle Wars - http://www.windwardreports.com/film.htm




        "Steven Cheng[MSFT]" wrote:
        Hello Dave,
        >
        As for the Console, each win32 process has a standard console output, input
        and err, you can write data to output. In console application, the console
        output is directly displayed. For winform or asp.net application, it is not
        displayed, there does have means to redirect console in .NET:
        >
        #Redirect I/O to a TextBoxWriter in .NET

        >
        However, for ASP.NET application, I think you may consider other means
        according to your actual scenario. Are you wantting to write out some debug
        or trace data? If so the System.Diagnost ics namespace contains classes that
        help perform debug and trace or logging.
        >
        Sincerely,
        >
        Steven Cheng
        >
        Microsoft MSDN Online Support Lead
        >
        >
        >
        =============== =============== =============== =====
        >
        Get notification to my posts through email? Please refer to
        Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.

        ications.
        >
        >
        >
        Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
        where an initial response from the community or a Microsoft Support
        Engineer within 1 business day is acceptable. Please note that each follow
        up response may take approximately 2 business days as the support
        professional working with you may need further investigation to reach the
        most efficient resolution. The offering is not appropriate for situations
        that require urgent, real-time or phone-based interactions or complex
        project analysis and dump analysis issues. Issues of this nature are best
        handled working with a dedicated Microsoft Support Engineer by contacting
        Microsoft Customer Support Services (CSS) at
        http://msdn.microsoft.com/subscripti...t/default.aspx.
        >
        =============== =============== =============== =====
        >
        >
        >
        This posting is provided "AS IS" with no warranties, and confers no rights.
        >
        >

        Comment

        • Steven Cheng[MSFT]

          #5
          Re: where does console output go?

          Thanks for your reply Dave,

          Actually, in .net framework application, those Diagnostics interfaces such
          as Debug, Trace object are the expected object for output some tracing
          info, you can redirect the output to your prefered output storage such as
          database, disk file..... Java console is simply a particular console which
          bind to the standard process output.

          Sincerely,

          Steven Cheng

          Microsoft MSDN Online Support Lead


          This posting is provided "AS IS" with no warranties, and confers no rights.

          Comment

          Working...