tysonjh
tysonjh

Reputation: 1339

How to silence exception stack trace from Play framework stdout

I'm receiving a,

java.lang.NullPointerException
    at play.core.server.netty.RequestBodyHandler$class.finish$1(RequestBodyHandler.scala:70)
    at play.core.server.netty.RequestBodyHandler$$anonfun$pushChunk$1$2$$anonfun$apply$2.apply(RequestBodyHandler.scala:53)
    at play.core.server.netty.RequestBodyHandler$$anonfun$pushChunk$1$2$$anonfun$apply$2.apply(RequestBodyHandler.scala:49)
    at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:29)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

printed to the console when reloading a page in the Play framework. The cause is irrelevant for the purpose of this question. I've tried to suppress the message but can not seem to figure it out. Even with ALL logback logging turned OFF this is the only message that is still printed.

Where is it coming from and how do I stop it?

Upvotes: 0

Views: 795

Answers (1)

joescii
joescii

Reputation: 6533

My guess is there is some code that is calling Exception.printStackTrace() rather that utilizing the logger. I did a quick google to figure out how to redirect standard error to a logger, but didn't immediately find the solution for ya. I know that log4j can do this.

Upvotes: 1

Related Questions