Is is possible to configure FileAppender in log4net to add new entries at the beginning of log file? Currently it is adding entries at the end and reading newest entries requires scrolling whole log down. It would be more comfortable to read from the beginning.
相关问题
- 最新的log4net是不是不支持写入到mysql了。
- Carriage Return (ASCII chr 13) is missing from tex
- Generic Generics in Managed C++
- How to store image outside of the website's ro
- How to Debug/Register a Permanent WMI Event Which
相关文章
- 最新的log4net是不是不支持写入到mysql了。
- .net中MessageBox.Show使用问题
- IdentityServer 报错:"idp claim is missing"
- 在 IdentityServer 中如何给 id token 添加更多信息
- IdentityServer 的 Selector 在哪个 nuget 包
- 使用 IdentityServer 的项目遭遇错误:"IDX20803: Unable to obt
- ASP.NET Core ConfigureServices 中从 appsettings.json
- .netCore 控制台程序输出配置问题
Use BareTail to view your log files. It automatically scrolls to the bottom of the files you view.
I don't know if that option is available in log4net (I wouldn't think so), but even if it's available I would advice against using it.
Appending to a file is a quite cheap operation. The bytes are just added to the end of the file. Prepending to a file on the other hand is rather expensive. The entire file has to be read and rewritten with the new data added at the beginning. This also means that it scales badly, i.e. the operation takes a lot longer when the file gets bigger.
If you want the entries displayed in a different order, you should look for that option in the program that is displaying the log, or look for a replacement that can display the entries in reverse order.