Question Error Log

stulish

Well-known member
Joined
Jun 6, 2013
Messages
61
Programming Experience
3-5
Hi all,

In a program i am making i need to log errors with Time, Faulty System, Error Text and Critical level of the error, the program needs to keep a log on the hard drive for 30 days that can be looked at by the system maintainer and the last 24 hours in memory for the users to peruse the errors.

What would people suggest is the best way of doing this (links to pages i can read to understand would also be useful), the system the program will run on is a standard PC/Laptop with some interfaces to the systems it is monitoring.

Thanks

Stu
 
Thanks John,

I thought this is mainly for logging information about the program (errors that occur within the program its self), what i was after was a way to log faults that are reported from peripherals via serial and across a Lan connection. My first thought was to create a spreadsheet type file or CSV. Is the logging information for use in this way?

Thanks again

Stu
 
I guess you could use the Log facility as you please. Writing to text file is also simple, for example using StreamWriter class.
 
Back
Top