Q:

Play 2.2 Filter in Subproject

I'm trying to intercept a request in a subproject and add to the request/block the response. Right now I'm just trying to prove that the interceptor is working and I can't get it to show the println. Based on my reading, I've got this:
package filters.edmoderator

import play.api.mvc._
import scala.concurrent.Future
import scala.concurrent.ExecutionContext.Implicits.global

object RequireModeration extends Filter {
  def apply(next: (RequestHeader) => Future[SimpleResult])(request: RequestHeader): Future[SimpleResult] = {
    val result = next(request)
    println("filter applied")
    result
  }
}

object Global extends WithFilters(RequireModeration)

Like I said, the println doesn't work. Do I need something in my build.sbt, something else?

A:

You need to declare your Global object in Global.scala in the root package. You could put it in some other package but would have to update application.conf accordingly.
import play.api._
import filters.edmoderator._

object Global extends WithFilters(RequireModeration)

