In our philosophy, an error log is always caused by a programmer error.
In Play 1.2.x, prod mode, any access to a non-existing page will trigger an error log:
ERROR (play) ~
MyController.myAction action not found
Action not found
Action MyController.myAction could not be found. Error raised is No method public static void myAction() was found in class controllers.MyController
play.exceptions.ActionNotFoundException: Action MyController.myAction not found
at play.mvc.ActionInvoker.getActionMethod(ActionInvoker.java:604)
at play.mvc.ActionInvoker.resolve(ActionInvoker.java:85)
at Invocation.HTTP Request(Play!)
Caused by: java.lang.Exception: No method public static void myAction() was found in class controllers.MyController
How can I configure Play not to issue an error log in this cases? Maybe a WARN
log level, at most?
The code for logging this is located in ActionInvoker.java(play 1.2.5RC4):
catch (ActionNotFoundException e) {
Logger.error(e, "%s action not found", e.getAction());
throw new NotFound(String.format("%s action not found", e.getAction()));
}
So it seems there is no way to adjust the logging level of the ActionNotFoundException. I agree that this should not be at the 'error' level. I would recommend opening up a ticket at https://play.lighthouseapp.com/dashboard.
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