C# read and write log file
-
I would like to know how to accomplish the following goals in C#: 1. In an existing C# 2008 application, I would like to create two separate log files. a. The first log file would write out data in a fixed file format prferably to a text file. A new C# 2010 desktop and/or console application would be written to read this file and do furher processing. b. The second log file would be written to display any messages generated by the console application and/or messages that are generated by a web service the console application calls. Can you show me how to create these two log files? 2. A new C# 2010 desktop and/or console application will be written to process the information contained with the log file produced in a fixed file format in step 1a. listed above. Can you show me how to read the log file that is in a text file fixed format? Can you tell if the log file generated in a fixed file format should be generated in another format besides text? If so, what format should be used and can you tell me how to read the data in this alternative file format?
-
I would like to know how to accomplish the following goals in C#: 1. In an existing C# 2008 application, I would like to create two separate log files. a. The first log file would write out data in a fixed file format prferably to a text file. A new C# 2010 desktop and/or console application would be written to read this file and do furher processing. b. The second log file would be written to display any messages generated by the console application and/or messages that are generated by a web service the console application calls. Can you show me how to create these two log files? 2. A new C# 2010 desktop and/or console application will be written to process the information contained with the log file produced in a fixed file format in step 1a. listed above. Can you show me how to read the log file that is in a text file fixed format? Can you tell if the log file generated in a fixed file format should be generated in another format besides text? If so, what format should be used and can you tell me how to read the data in this alternative file format?
sc steinhayse wrote:
Can you tell if the log file generated in a fixed file format should be generated in another format besides text?
No, plain old text format will be sufficient.
sc steinhayse wrote:
Can you show me how to read the log file that is in a text file fixed format?
A google search on basic file I/O in C# would be a good starting place.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
-
I would like to know how to accomplish the following goals in C#: 1. In an existing C# 2008 application, I would like to create two separate log files. a. The first log file would write out data in a fixed file format prferably to a text file. A new C# 2010 desktop and/or console application would be written to read this file and do furher processing. b. The second log file would be written to display any messages generated by the console application and/or messages that are generated by a web service the console application calls. Can you show me how to create these two log files? 2. A new C# 2010 desktop and/or console application will be written to process the information contained with the log file produced in a fixed file format in step 1a. listed above. Can you show me how to read the log file that is in a text file fixed format? Can you tell if the log file generated in a fixed file format should be generated in another format besides text? If so, what format should be used and can you tell me how to read the data in this alternative file format?