There is a web project that uses log4net. Logs are maintained in a text document in the Log folder. It is necessary to make an aspx page where logs will be shown. I previously did not work with logging and I see this solution in such a way that I take this text file, parse it and paste it into the page. But this decision seems to me to be wrong. Are there any other options for outputting logs to the page?

    1 answer 1

    There is no magic way to show logs on the page.

    You configure log4net by pointing it using appenders where to write logs. The list of available appenders can be viewed on the office .

    Accordingly, if you want to display logs on the page, you need to choose where to write them, then read them from there. A text file and a database are the easiest options, as it seems to me. There is also AspNetTraceAppender, maybe it will work better (I'm not really familiar with ASP.NET, so I can't say more precisely).