Creating log files from Console App

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rathtap

    Creating log files from Console App

    Is there any way to generate a log file with respect to errors that
    may have occurred in a console app? Specifically, are TraceSwitch and
    TraceListener one way to do it?
  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: Creating log files from Console App

    Rathtap,

    The TraceSwitch and TraceListener can be used. Basically, you would
    have to hook up a listener that will write to the log file. The thing is,
    you have to indicate when and what you want written to the file. That's
    your responsibility.

    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m

    "Rathtap" <amcniw@yahoo.c om> wrote in message
    news:b21a5958.0 311120745.6dee5 34d@posting.goo gle.com...[color=blue]
    > Is there any way to generate a log file with respect to errors that
    > may have occurred in a console app? Specifically, are TraceSwitch and
    > TraceListener one way to do it?[/color]


    Comment

    Working...