Question

I am new in logging. Will try to introduce my problem.. I have an application running on tomcat server and some selenium tests running on my pc. I have an issue how to get application logs when selenium test finished working (write somewhere, for example, to target catalogue). I see there is Logback api, which should be configured on tomcat server, maybe this api is the best for my approach ? Also, how I can pass app log to my pc (after selenium test was executed) from tomcat server (I need only app logs), which is deployed on different server (maybe by using remote service) ? Any related information would be appreciated. Thanks in advence!

Was it helpful?

Solution 2

Found a solution. Used Spring MVC web services. On client side wrote a client for http queries sending and receiving (for logging start and stop/ receive). When the controller receives 'start' query, logback is turned on. When controller receives 'stop' query, logging is stopped and all trace is sent to client, then all trace is written to the file. I used OutputStreamAppender appender on controller, which I think is better than FileAppender. These 'start' and 'stop' are initiated in @Before and @After methods.

OTHER TIPS

You can either save all logback logs (filtered?) on the sever and ask for them at the end of the test. Or use: SocketAppender or SSLSocketAppender that will output all the log lines to your computer.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top