org-arl / fjage

Framework for Java and Groovy Agents
https://fjage.readthedocs.io/en/latest/
Other
25 stars 13 forks source link

Improving jetty warnings #267

Closed notthetup closed 1 year ago

notthetup commented 1 year ago

We shim the Jetty Logger to redirect the logs to standard fjåge logs. But jetty tends to use SLFJ style log statements with implicit string interpolation using {}.

This PR adds a very simple mechanism in the shim to interpolate and replace all the {} with the toString version of the argument objects. This would enable the warnings from jetty to be printed completely in fjage logs..

For example, before :

1675069150492|WARNING|org.arl.fjage.connectors.WebServer@1:warn|bad alias ({} {}) for {}

after :

1675131104860|WARNING|org.arl.fjage.connectors.WebServer@1:warn|bad alias (java.security.AccessControlException access denied ("java.io.FilePermission" "/home/unet/logs" "readlink")) for /home/unet/logs