Simple Aion log parser problem/question

08/13/2011 15:31 qwe2#1
Hi. I'm working on a simple log parser which works pretty well but I have a big problem. If I try to access the Chat.log while Aion is running the client crashes.
I'm using C# and a Streamreader to parse the file. Any ideas?
08/15/2011 13:23 Nirasicho#2
the problem is file access.
It is not possible that 2 programs access the same file at the same time.
If you had looked at the error message you'd have found out on your own.

To prevent that you can try to copy the log file, read it and then delete the copy.

Also I suggest you take a look at error handling, this is pretty important when dealing with IO in c# (and any other programming language).

Best regards,
Rajin
08/17/2011 20:08 Blastradius#3
Look at FileWatcher and Shared Access, this allows notification of new content and reading up to the new content. Pretty basic, just google it, or steal it from open source loggers (assuming they do this the same way).
08/27/2011 08:51 Fiken#4
eik i paieska ir rasyk as esu nubas.