jeudi 13 août 2015

I'm using the Play Framework an would like to log things in the server console. My Java file looks like this:

package controllers;

import play.*;
import play.mvc.*;
import play.api.Logger;

import views.html.*;

public class Product extends Controller {

    public Result index(String username) {

      Logger.debug("Attempting risky calculation.");

      return ok(views.html.index.render(views.html.product.render()));

    }
}

And this produces the following error

java.lang.String cannot be converted to scala.Function0<java.lang.String>

I followed this tutorial, but the Logger doesn't work.

What is the problem in this case?




Aucun commentaire:

Enregistrer un commentaire