riddled with console messages

R

rodchar

hi all,
i have a console app that takes care of a process that involves several
steps. And at each of those steps i report to the console that status of the
process. So I have all these System.Console statements thru out all my
classes.

Is there a better way to manage these messages? better design pattern?

thanks,
rodchar
 
P

Peter Morris

Do you NEED them to go to the console, or are they there fore debugging? If
you are using them for debugging use

System.Diagnostics.Debug.WriteLine instead, and look in the Output window in
VS.
 
J

Jon Skeet [C# MVP]

rodchar said:
i have a console app that takes care of a process that involves several
steps. And at each of those steps i report to the console that status of the
process. So I have all these System.Console statements thru out all my
classes.

Is there a better way to manage these messages? better design pattern?

Yup: use log4net.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top