Not easy to do with Jersey 2 but here's a good one to start with:
https://www.javaguides.net/2018/06/jersey-rest-logging-using-loggingfeature.html
And here is how to bridge it to log4j:
https://stackoverflow.com/questions/15437043/how-to-use-log4j-to-see-into-jersey
https://xiaozhoutech.wordpress.com/2013/08/02/log4j-working-on-jersey/
http://jersey.576304.n2.nabble.com/Enable-Logging-td7581002.html
OK folks, this one works:
https://www.logicbig.com/tutorials/misc/java-logging/jul-to-slf4j-log4j2.html
Will post code later
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment