在我们的理念中,错误日志总是由程序员错误引起的。
在 Play 1.2.x 的 prod 模式下,任何对不存在页面的访问都会触发错误日志:
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
在这种情况下,如何将 Play 配置为不发出错误日志?最多可能是一个WARN
日志级别?