TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
dc
NA
663
0
C# 2008 write to console log file
Nov 9 2012 11:52 AM
In an existing C# 2008 application, I want to have error messages written to a log file that can be saved and looked at later for a reference. I basically want to generate console.writeline messages and save the output. I could also use something like objUtil.LogMessage to accomplish this goal.
I would like to accomplish the following goals:
1. Do I need to 'open' some kind of a log file. If so, how would you code this?
2. I would like to save ex.messages that are located in try catch blocks. Does this require any special code?
3. I would like to open and save the log files to a certain directory path location.
4. I could possibly use objUtil.LogMessage and/or console.writeline separate or together? Is this possbile, if so how is this possible?
Thus can you tell me and or show me in code how to accomplish any and/or all of the goals I just listed above?
Reply
Answers (
4
)
Convert vb to c#
vb.net programs & source code