I have a java 7 EE web application. For logging I am using logback. How can I see the logs, which are printed with logger.debug
or logger.info
in the console
or a file
while the application is running on a html website online in the form of a HTML table?
Is there nothing like http://www.example.com/mywebapp/logback-logs.html ?
I would like to have something like the following: https://logback.qos.ch/manual/layouts.html#ClassicHTMLLayout https://logback.qos.ch/manual/configuration.html#viewingStatusMessages
Is there any way how I could configure my logback.xml to make all those logs available online?
I think what you should do is log your messages into a file with HTMLLayout configuration and create a REST-Resource in your application that serves this file as response for a simple GET request. I that way you can easily access your logfiles as a web page.
As the purpos of logback is writing logs and not serving them as website, I am not aware of it that this would also be possible with a simple configuration setup.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With