How to write log as newest on the first in file? Is there some configuration?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You will not find any logger which can do that since the whole file have to be rewritten each time a new log entry is added.
Find a log viewer which can view the log in reverse order instead. Is a lot more resource efficient.
Update
Here is a stream which reads a file backwards:
How to read a text file reversely with iterator in C#