Results 1 to 2 of 2

Thread: console output

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    console output

    Hi there.

    I am making 2 types of interfaces for an application, a GUI and a command interface which will take some parameters

    now, through the GUI, if any errors occur while it is processing its stuff, it will write to a log file.

    the command interface will also have this option, however i am planning to provide the user with the option to log errors on the screen, not just the error log file.

    how is it possible to direct the error logging to one console or another through both?

    the GUI is a seperate interface
    The command line is a seperate interface
    The main processing is a seperate interface

    the main processing interface will write errors to an error log file

    but how can i tell that to redirect the output to the screen, or maybe tell the command line to redirect it internally

    any ideas?

    or should i just give it a parameter internally, where when it is creating or setting the output file, to set it according to the parameter, such as if it should be a console or a file?


    Thanks!

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    just pass parameter telling what to output to and just use a normal switch statement and code as necessary.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width