Play
带有trait
,它使用Logger
。
trait PlayBodyParsers extends BodyParserUtils {
private val logger = Logger(classOf[PlayBodyParsers])
特质具有检查请求正文的方法。它使用`logger。我想查看记录仪创建的打印件。我该怎么办?
def anyContent(maxLength: Option[Long]): BodyParser[AnyContent] = BodyParser("anyContent") { request =>
contentType match {
case Some("text/plain") =>
logger.trace("Parsing AnyContent as text") //I WANT TO SEE THIS
text(maxLengthOrDefault)(request).map(_.right.map(s => AnyContentAsText(s)))