I need an ActorSystem
that does not log anything. Trying HTTP things with spray, I'm so stupid that I can't help copying and pasting their example code here. As you would see they're using ActorSystem
, whose default config messes up the stdout with a whole bunch of INFO. So how do you make an ActorSystem
that fits to my need? If it could be done without any external XML or config files, I would love the way. Thank you! :)
import spray.http._
import spray.client.pipelining._
import akka.actor.ActorSystem
import com.typesafe.config._
val config = ConfigFactory.load()
.withValue("akka.loglevel", ConfigValueFactory.fromAnyRef("OFF"))
.withValue("akka.stdout-loglevel", ConfigValueFactory.fromAnyRef("OFF"))
implicit val system = ActorSystem("AlwaysNameYourSystem", config)
import system.dispatcher // execution context for futures
// ... here goes the rest of example code
What's done here
ActorSystem
with explicit configuraion (docs here).At this point you shouldn't see any messages during system startup and any spray notification
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With